From: Subject: Lung cancer pathogenesis associated with wood smok... [Chest. 2005] - PubMed result Date: Fri, 4 Jun 2010 22:26:48 +1000 MIME-Version: 1.0 Content-Type: multipart/related; type="text/html"; boundary="----=_NextPart_000_001B_01CB0435.05D27ED0" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 This is a multi-part message in MIME format. ------=_NextPart_000_001B_01CB0435.05D27ED0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.ncbi.nlm.nih.gov/pubmed/16002925 =EF=BB=BF Lung cancer = pathogenesis associated with wood smok... [Chest. 2005] - PubMed = result =0A= var ncbi_startTime =3D new Date();=0A=
My NCBISign InSign Out
RSS Settings
  • Search:
=20

Display=20 Settings:

  • Abstract
Format
Apply

Send to:

Choose Destination

Create File

  • 1 selected item: 16002925
  • MeSH and Other Data
E-mail
"SPAM"=20 filtering software notice

Add to = Clipboard

Add to = Collections
Order = articles
  • Performing your original search, cancer = Respiratory Effects Of Wood Smoke,, in PubMed will = retrieve 3=20 records.

Chest. 2005=20 Jul;128(1):124-31.

Lung cancer pathogenesis associated with wood smoke=20 exposure.

Delgado=20 J, Martinez=20 LM, S=C3=A1nchez=20 TT, Ramirez=20 A, Iturria=20 C, Gonz=C3=A1lez-Avila=20 G.

Laboratorio de Matriz Extracelular, Departamento de = Enfermedades=20 Cr=C3=B3nico Degenerativas, Instituto Nacional de Enfermedades = Respiratorias, Calzada=20 de Tlalpan 4502, CP 14080, Mexico, D.F., Mexico.

Comment in:

Abstract

BACKGROUND: Tobacco is considered the most important cause of lung = cancer,=20 but other factors could also be involved in its pathogenesis. The aim of = the=20 present work was to establish an association between wood smoke exposure = and=20 lung cancer pathogenesis, and to analyze the effects of wood smoke on = p53 and=20 murine double minute 2 (MDM2) protein expression. DESIGN: Blood samples = were=20 obtained from 62 lung cancer patients, 9 COPD patients, and 9 control = subjects.=20 Of the 62 lung cancer patients, 23 were tobacco smokers (lung cancer = associated=20 with tobacco [LCT] group), 24 were exposed to wood smoke (lung cancer = associated=20 with wood smoke [LCW] group), and 15 could not be included in these = groups.=20 Western blot assays were performed to identify the presence of p53, = phospho-p53,=20 and murine double minute 2 (MDM2) isoforms in plasma samples. = Densitometric=20 analysis was used to determine the intensity of p53, phospho-p53, and = MDM2=20 bands. RESULTS: Approximately 38.7% of the lung cancer patients examined = had an=20 association with wood smoke exposure, most of them women living in rural = areas.=20 Adenocarcinoma was present in 46.7% of these patients. The p53 and = phospho-p53=20 proteins were significantly increased in LCW samples (56,536.8 +/- 4,629 = densitometry units [DU] and 58,244.8 +/- 7,492 DU, respectively [+/- = SD]), in=20 comparison with the other groups. The 57-kD MDM2 isoform plasma = concentration=20 was very high in LCW and LCT samples (75,696.4 +/- 11,979 DU and = 78,551.7 +/-=20 11,548 DU, respectively). MDM2-p53 complexes were present in a high=20 concentration in control and COPD subjects. This allows p53 degradation = and=20 explains the low concentrations of p53 found in these groups. = MDM2-phospho-p53=20 complexes were observed in COPD but not in the other samples. This = correlates=20 with the low concentration of p53 observed in the COPD group (13,657 +/- = 2,012=20 DU), and could explain the different clinic evolution of this smoker = population=20 in comparison with the LCT subjects. CONCLUSION: This study suggests = that there=20 is a possible association of lung cancer with wood smoke exposure. = Likewise, our=20 findings demonstrate that wood smoke could produce similar effects on = p53,=20 phospho-p53, and MDM2 protein expression as tobacco.

PMID: 16002925 [PubMed - indexed = for=20 MEDLINE]Free Article

Publication Types, MeSH Terms,=20 Substances

Publication Types:

  • Comparative=20 Study

MeSH Terms:

  • Adenocarcinoma/etiology*
  • Adenocarcinoma/metabolism
  • Adenocarcinoma/physiopathology
  • Environmental=20 Exposure*
  • Female
  • Humans
  • Lung=20 Neoplasms/etiology*
  • Lung=20 Neoplasms/metabolism
  • Lung=20 Neoplasms/physiopathology
  • Male
  • Nuclear=20 Proteins/blood
  • Proto-Oncogene=20 Proteins/blood
  • Proto-Oncogene=20 Proteins c-mdm2
  • Respiratory=20 Function Tests
  • Smoke/adverse=20 effects*
  • Smoking/adverse=20 effects
  • Statistics,=20 Nonparametric
  • Tumor=20 Suppressor Protein p53/blood
  • Wood*

Substances:

LinkOut - more resources

Full Text Sources:

  • HighWire=20 Press
  • EBSCO
  • MD=20 Consult
  • Ovid=20 Technologies, Inc.
  • ProQuest=20 Information and Learning

Medical:

Supplemental Content

= =20

Related citations

See=20 reviews... See=20 all...

All links from this record

  • Related Citations=20
    Calculated set of PubMed = citations=20 closely related to the selected article(s) retrieved using a word = weight=20 algorithm. Related articles are displayed in ranked order from most to = least=20 relevant, with the =E2=80=9Clinked from=E2=80=9D citation displayed = first.
  • Substance (MeSH Keyword)=20
    PubChem chemical = substance=20 (submitted) records that are classified under the same Medical Subject = Headings (MeSH) controlled vocabulary as the current=20 articles.

Recent activity

=20
Clear=20 Turn=20 Off Turn=20 On

Your browsing activity is empty.

Activity recording is turned off.

Turn=20 recording back on

See = more...=20
You are here: NCBI > Literature = >=20 PubMed
Write to the Help Desk =20
Copyright = | Dis= claimer=20 | Privacy | Accessibili= ty |=20 Conta= ct=20

National Center for Biotechnology=20 Information, U.S. National Library of = Medicine=20 8600 Rockville = Pike, Bethesda MD, 20894 USA=20

");this.oLoaded.push(sNewSrc);}}},sBase= :"",oLoaded:[]},insertInHtml:function(text,obj){if(document.all){obj.inne= rHTML+=3Dtext;}else{var = range=3Ddocument.createRange();range.setStartAfter(obj);var = docFrag=3Drange.createContextualFragment(text);obj.appendChild(docFrag);}= },replaceInHtml:function(text,obj){if(document.all){obj.innerHTML=3Dtext;= }else{while(obj.hasChildNodes())obj.removeChild(obj.firstChild);var = range=3Ddocument.createRange();range.setStartAfter(obj);var = docFrag=3Drange.createContextualFragment(text);obj.appendChild(docFrag);}= },drawText:function(sText,sId,add){if(!sId)sId=3D"debug";var = obj=3Ddocument.getElementById(sId);if(obj){if(add)=0A= obj.innerHTML=3D"
"+sText;else=0A= obj.innerHTML+=3DsText;}},createNewId:function(){var = newid=3Dnull;while(!newid||document.getElementById(newid)){newid=3D"XID"+= Math.round(Math.random()*65536).toString(16);}=0A= return newid;}};String.prototype.trimSpaces=3Dfunction(trimMode){var = targetString=3Dthis;var = iPos=3D0;if(!trimMode)trimMode=3D0;if(trimMode=3D=3D0||trimMode=3D=3D1){i= f(targetString.charAt(iPos)=3D=3D" = "){while(targetString.charAt(iPos)=3D=3D" = ")iPos++;targetString=3DtargetString.substr(iPos);}}=0A= iPos=3DtargetString.length-1;if(trimMode=3D=3D0||trimMode=3D=3D2){if(targ= etString.charAt(iPos)=3D=3D" "){while(targetString.charAt(iPos)=3D=3D" = ")iPos--;targetString=3DtargetString.substr(0,iPos+1);}}=0A= return targetString;}=0A= function $(){var elements=3Dnew Array();for(var = i=3D0;i""){oElements[oElements.length]=3Dels[i];}}=0A= return oElements;}=0A= function $N(name,node){var = oElements=3D[];if(node=3D=3Dnull)node=3Ddocument;var = els=3Dnode.getElementsByName(name);for(i=3D0;i""){if(rule= hash[thisName]){oThis.addRule(oThis,sActionEvent,thisName,oThis.doDataExc= hange,rulehash[thisName]);}=0A= if(activenames[thisName]){oThis.addRule(oThis,sActionEvent,thisName,oThis= .doSubmitAttribute,null);}=0A= oThis.listenForEvents(domCtrl,sActionEvent);}}finally{}};},addRule:functi= on(oThis,sEvent,sName,fFunc,oArg){var rules=3Dthis._rules;var = ename=3DsName+"$"+sEvent;var = i;if(typeof(rules[ename])!=3D'undefined'){for(i=3D0;i0)){el[0].value=3DdomTarget.get= Attribute("href");}}=0A= Dispatcher.getInstance().requestSubmit();},handleAction:function(e){var = d=3DDispatcher.getInstance();var t=3Dthis;var = i;if(t.tagName&&t.tagName.toLowerCase()=3D=3D'a'){e.preventDefault();e.st= opPropagation();}=0A= var = realname=3Dthis.getAttributeNode("realname");realname=3Drealname?realname= .value:null;if(this.name||realname){d.setSubmitSource(realname||this.name= );}=0A= d.submitCheckBegin();try{console&&console.info("Executing rule = "+t.name+"."+e.type);var = rules=3Dd.getRulesFor(t.name,e.type);for(i=3D0;rules&&(i0)){if(typeof(sourceName)=3D=3D'undefined'){console&&console.war= n("Warning: Can't identify submitter: using = p$a=3D''");}else{el[0].value=3DsourceName;}}},getSrcDst:function(oRule,oN= otifierObj){function x_FindObj(name,sid){var oResult=3D[];var = oControls=3D$N(name);for(var = i=3D0;i""?", = ":"")+oSrcDst.src[i].value;}}},SetValue:function(oListener,oRule,sMessage= ,oNotifierObj){var dispatcher=3DoListener;var = oSrcDst=3Ddispatcher.getSrcDst(oRule,oNotifierObj);for(var = j=3D0;j=3D0){dstItems.splice(position,1);}}=0A= dst.value=3DdstItems.join(", = ");}},PropertyToValue:function(oListener,oRule,sMessage,oNotifierObj){var= dispatcher=3DoListener;var = oSrcDst=3Ddispatcher.getSrcDst(oRule,oNotifierObj);for(var = j=3D0;j=3D0){prop=3Dattr.substring(ix+1);attr=3Dattr= .substring(0,ix);}=0A= var inp=3Dthis.getInputs(attr);if(!inp){return null;}=0A= if(inp.length=3D=3D1){inp=3Dinp[0];return(prop&&prop.toLowerCase()!=3D=3D= "value")?inp.getAttribute(prop):htmlutils.getValue(inp);}=0A= var result=3D[];for(var = i=3D0;i=3D0){prop=3Dattr.substring(ix+1)= ;attr=3Dattr.substring(0,ix);}=0A= if(prop){throw"UNIMPLEMENTED: Component.getList: Getting list by = property";}=0A= var inp=3Dthis.getInputs(attr);if(!inp){return null;}=0A= if(inp.length=3D=3D1){inp=3Dinp[0];return htmlutils.getList(inp);}=0A= var result=3D[];for(var = i=3D0;i=3D0){prop=3Dattr.substring(ix+1);attr=3Da= ttr.substring(0,ix);}=0A= var = inp=3Dthis.getInputs(attr);if(inp.length=3D=3D1){inp=3Dinp[0];if(prop){if= (typeof(inp[prop])!=3D'undefined'){inp[prop]=3Dvalue;}else{inp.setAttribu= te(prop,value);}}else{inp.value=3Dvalue;}}else{throw"UNIMPLEMENTED: = Cannot (yet) set vector values from = scalar";}},getInputs:function(name){var = inp=3Ddocument.getElementsByName(this.path+"."+name);if(!inp||inp.length=3D= =3D=3D0){inp=3Dnull;}=0A= return inp;},getInput:function(name){var = inp=3Dthis.getInputs(name);return((inp&&inp.length>0)?inp[0]:null);},has:= function(attrname){var = inp=3Ddocument.getElementsByName(this.path+"."+attrname);return(inp&&(inp= .length>0));},addEvent:function(inputName,eventName,f,flag){var = inputs;var = oThis=3Dthis;if(typeof(inputName)=3D=3D'string'){inputs=3Dthis.getInputs(= inputName);}else = if(utils.isArray(inputName)){inputs=3DinputName;}else{inputs=3D[inputName= ];}=0A= if(!inputs){console&&console.warn("Can't find: "+inputName);return;}=0A= var = d=3DDispatcher.getInstance();for(i=3D0;i 0) { var label =3D (c[0].textContent || c[0].innerText);=20 var cit =3D getCitation(node); label =3D "

" + label + "

"; if (cit && cit > ""){ // avoid "undefined" value label =3D label + "

" + cit + = "

"; }=20 return label; } =20 },=20 direction: PopDiv.POP_LEFT,=20 popperId: "ppPopper",=20 delay: 0=20 });=20 }); Portal.Portlet.HistoryDisplay =3D = Portal.Portlet.NCBIPageSection.extend({ init: function(path, name, notifier) { console.info("Created History Ad..."); this.base(path, name, notifier); =20 }, =09 send: { 'Cmd': null =20 }, =20 =20 receive: function(responseObject, userArgs) { =20 var cmd =3D userArgs.cmd; var rootNode =3D document.getElementById('HTDisplay');=20 var ul =3D document.getElementById('activity'); var resp =3D responseObject.responseText; =20 if (cmd =3D=3D 'HTOn') {=20 rootNode.className =3D ''; // hide all msg and the turnOn = link try {=0A= //alert(resp); // Handle timeouts if (responseObject.status =3D=3D 408) {=20 rootNode.className =3D 'HTOn'; // so that the = following msg will show up rootNode.innerHTML =3D "

Your = browsing activity is temporarily unavailable.

"; return; } =20 // Looks like we got something... resp =3D '(' + resp + ')'; var JSONobj =3D eval(resp); =20 // Build new content (ul) var newHTML =3D JSONobj.Activity; var newContent =3D document.createElement('div'); newContent.innerHTML =3D newHTML; var newUL =3D newContent.getElementsByTagName('ul')[0]; //alert(newHTML); //alert(newContent.innerHTML); //alert(newUL.innerHTML); // Update content rootNode.replaceChild(newUL, ul); //XHR returns no activity (empty ul), e.g. activity = cleared if (newUL.className =3D=3D 'hide') =20 rootNode.className =3D 'HTOn'; // show "Your = browsing activity is empty." message =20 } =20 catch (e) { //alert('error'); rootNode.className =3D 'HTOn'; // so that the following = msg will show up rootNode.innerHTML =3D "

Your browsing = activity is temporarily unavailable.

"; } } else if (cmd =3D=3D 'HTOff') { =20 if (ul !=3D null) {=20 ul.className=3D'hide';=20 ul.innerHTML =3D ''; // clear activity } rootNode.className =3D 'HTOff'; // make "Activity = recording is turned off." and the turnOn link show up =20 } else if (cmd =3D=3D 'ClearHT') { =20 if ( rootNode.className =3D=3D '') { // =20 rootNode.className =3D 'HTOn'; // show "Your browsing = activity is empty." message =20 if (ul !=3D null) { ul.className=3D'hide';=20 ul.innerHTML =3D ''; } } =20 }=20 =20 }, =20 listen: { 'Cmd' : function(sMessage, oData, sSrc){ console.info("Inside Cmd in HistoryDisplay: " + oData.cmd); this.setValue("Cmd", oData.cmd); }, =20 =09 "HistoryToggle" : function(e, target, name){ //alert(target.getAttribute("cmd")); this.send.Cmd({'cmd': target.getAttribute("cmd")}); =20 console.info("Inside HistoryToggle in HistoryDisplay: " + = target.getAttribute("cmd")); =20 //var site =3D document.forms[0]['p$st'].value; var cmd =3D target.getAttribute("cmd"); =20 =0A= // Issue asynchronous call to XHR service, callback is to = update the portlet output =0A= this.doRemoteAction(target.getAttribute("cmd")); = =20 },=20 =20 "HistoryOn" : function(e, target, name){ this.send.Cmd({'cmd': target.getAttribute("cmd")}); = //$PN('Pubmed_ResultsSearchController').getInput('RecordingHistory').valu= e =3D 'yes'; =20 console.info("Inside HistoryOn in HistoryDisplay: " + = target.getAttribute("cmd")); this.doRemoteAction(target.getAttribute("cmd")); =20 }, =20 "ClearHistory" : function(e, target, name){ this.send.Cmd({'cmd': target.getAttribute("cmd")});=0A= this.doRemoteAction(target.getAttribute("cmd")); =20 } },=0A= =0A= 'getPortletPath': function(){ return this.realname + ".NCBIPageSection"; }, =0A= =0A= 'doRemoteAction': function(command) { var site =3D document.forms[0]['p$st'].value; =20 var resp =3D xmlHttpCall(site, this.realname, command, {}, = this.receive, {'cmd': command}, this); } }); function getCitation(node) { // var withHistorys =3D cssQuery("*[title]", node); does not work!!! = =20 var withTitles =3D $AN('title', node, '*'); //alert(withTitles.length + " " + withTitles[0].tagName + " " + = withTitles[withTitles.length-1].tagName); //alert(withTitles[1].getAttribute('title')); if (withTitles.length > 0) { =20 var p =3D withTitles[0]; var s =3D p.getAttribute("title"); if (s && s > "") {=20 //alert(s); p.setAttribute("title", ""); node._title =3D s; for (var i =3D 0; i < withTitles.length; i++) { withTitles[i].removeAttribute("title"); =20 } } /*else { //fixed in utils.js =20 s =3D node._title; // required for IE b/c of the bug in $AN }*/ } else { s =3D node._title; //alert("old s "+ s); } return s; }=0A= //=0A= // Java Module PopDiv_JS=0A= //=0A= =0A= //=0A= // Shows and hides a div at a specific location, either (x,y), or = relative to=0A= // an element in a specific direction.=0A= //=0A= // Limitations:=0A= // - height or width must be set on the popper div, or it may not = position correctly.=0A= //=0A= // You're probably better off using ElementPopper instead of PopDiv for = hover pops. Popper handles mouse events=0A= // correctly.=0A= //=0A= // Arguments:=0A= // divId: the id of the div to use for the popper. You can also pass a = DOM node, and PopDiv will use that node.=0A= // The default is "popperDiv".=0A= // className: Add this className to the popper div. Optional--no = default. This is useful for setting up default state.=0A= //=0A= // It's preferable to use a single PopDiv to render popups all over=0A= // a single page. You only need as many PopDivs as the maximum number of = popups you may=0A= // ever have open at once. See ElementPopper for details.=0A= =0A= var PopDiv =3D function(divId, className) {=0A= =0A= var innerdiv =3D null;=0A= =0A= // default is a string=0A= if (typeof(divId) =3D=3D 'undefined') {=0A= divId =3D "popperDiv";=0A= }=0A= =0A= // Find or make popper div=0A= if ((this.div =3D document.getElementById(divId)) =3D=3D null) {=0A= =0A= this.div =3D document.createElement("div");=0A= this.div.id =3D divId;=0A= this.div.className =3D "popper";=0A= if (className) {=0A= this.div.className +=3D " " + className;=0A= }=0A= document.body.appendChild(this.div);=0A= this.div.innerHTML =3D "
";=0A= } else {=0A= utils.addClass(this.div, "popper"); // Be sure it has this=0A= }=0A= =0A= // this.innerdiv is first element of this.div=0A= for (this.innerdiv =3D this.div.firstChild;=0A= this.innerdiv && this.innerdiv.nodeType !=3D 1;=0A= this.innerdiv =3D this.innerdiv.nextSibling) {=0A= }=0A= =0A= // If caller provided a div with no inner divs, add one.=0A= if (!this.innerdiv) {=0A= this.innerdiv =3D document.createElement("div");=0A= this.innerdiv.className =3D "popperInnerDiv";=0A= this.div.appendChild(this.innerdiv);=0A= }=0A= }=0A= =0A= PopDiv.POP_ABOVE =3D 0;=0A= PopDiv.POP_RIGHT =3D 1;=0A= PopDiv.POP_BELOW =3D 2;=0A= PopDiv.POP_LEFT =3D 3;=0A= PopDiv.POP_CLASSES =3D ['pop-above', 'pop-right', 'pop-below', = 'pop-left'];=0A= =0A= PopDiv.POPPED =3D 'popped';=0A= PopDiv.POP_GETXY =3D 'pop-getxy';=0A= =0A= PopDiv.prototype =3D {=0A= // Show it at x, y=0A= showAt: function(html, x, y) {=0A= =0A= //console.info("POP @ (" + x + ", " + y + ")");=0A= //console.info("----");=0A= =0A= // Set content if provided=0A= if (html) {=0A= this.innerdiv.innerHTML =3D html;=0A= }=0A= =0A= this.div.style.left =3D x + "px";=0A= this.div.style.top =3D y + "px";=0A= =0A= // Pop it=0A= utils.addClass(this.div, PopDiv.POPPED);=0A= =0A= },=0A= =0A= // Show it near element ("dir" indications direction)=0A= // Dimensions don't exist if element isn't shown.=0A= getXY: function() {=0A= var popped =3D utils.hasClass(this.div, PopDiv.POPPED);=0A= =0A= if (!popped) {=0A= utils.addClass(this.div, PopDiv.POPPED);=0A= }=0A= var dim =3D utils.getXY(this.div);=0A= if (!popped) {=0A= utils.removeClass(this.div, PopDiv.POPPED);=0A= }=0A= =0A= return dim;=0A= },=0A= =0A= hide: function() {=0A= utils.removeClass(this.div, PopDiv.POPPED);=0A= if (this.popClass) {=0A= utils.removeClass(this.div, this.popClass);=0A= this.popClass =3D null;=0A= this.popnode =3D null;=0A= }=0A= },=0A= =0A= // showBy shows a popper adjacent to another item.=0A= showBy: function(html, elem, dir) {=0A= var dx =3D 0;=0A= var dy =3D 0;=0A= =0A= // Already popped over a particular popnode=0A= if (this.popnode && (this.popnode =3D=3D elem)) {=0A= return;=0A= }=0A= this.popnode =3D elem;=0A= =0A= // Default direction=0A= if (typeof(dir) !=3D "number") {=0A= dir =3D PopDiv.POP_LEFT;=0A= }=0A= =0A= // Set class "pop-": this determines margin=0A= this.popClass =3D PopDiv.POP_CLASSES[dir];=0A= //console.info("dir =3D " + dir +", popclass =3D " + = this.popClass);=0A= utils.addClass(this.div, this.popClass);=0A= =0A= // Set text so that sizing is correct=0A= this.innerdiv.innerHTML =3D html;=0A= =0A= // Get geometries of target and popper=0A= var thatdim =3D utils.getXY(elem);=0A= var popdim =3D this.getXY(this.div);=0A= //console.info("that =3D");=0A= //console.info(thatdim);=0A= //console.info("pop =3D ");=0A= //console.info(popdim);=0A= =0A= // Calculate position=0A= switch (dir) {=0A= case PopDiv.POP_ABOVE: dy =3D -1*popdim.h; break;=0A= case PopDiv.POP_LEFT: dx =3D -1*popdim.w; break;=0A= case PopDiv.POP_BELOW: dy =3D thatdim.h; break;=0A= case PopDiv.POP_RIGHT: dx =3D thatdim.w; break;=0A= default:=0A= throw "PopDiv: Invalid direction: " + dir;=0A= }=0A= //console.info("Popping at: [x=3D" + (thatdim.x + dx) + ", = y=3D"+(thatdim.y + dy)+"]");=0A= =0A= this.showAt(null, thatdim.x + dx, thatdim.y + dy);=0A= }=0A= };=0A= =0A= =0A= =0A= // An ElementPopper shows a popup adjacent to a target element when the = user mouses over the target.=0A= // It handles browser events and manipulates a popper to show and hide = detail data.=0A= //=0A= // When the mouse cursor enters the target, the content appears in the = popper nearby.=0A= // When the mouse cursor leaves the target, the popper is hidden.=0A= //=0A= // This rather intense event handling code is necessary because = mouseover and mouseout doesn't work=0A= // as expected--mouseouts occur when moving over child nodes. The = "relatedTarget" trick described=0A= // by PPK (quirksmode.org) doesn't work either, because browsers = sometimes drop events=0A= // with related targets. So the only option is to capture = document.onmousemove, and detect when=0A= // the mouse either exits document.body, or moves over something that is = neither the target nor=0A= // one of its children.=0A= //=0A= // "popnode" is the target node=0A= // "content" is either a string (the content to show), a DOM node (show = its innerHTML), or a function.=0A= // "config" is configuration; if it's just a number, then it's = "direction" (PopDiv.POP_*); otherwise, it's a JS object with =0A= // attribute/value pairs=0A= // "popperId" is the ID to assign to the popper; default is to make one = up.=0A= //=0A= // When used with Ext.Ncbi, the popper should initialize itself on the = page a few hundred=0A= // ms after the page loads. IE apparently creates a race condition where = popper and Ext.Ncbi initialization=0A= // throw away the event handlers on which ElementPopper depends.=0A= //=0A= // So in that case, instead of new ElementPopper(a,b), you want to do:=0A= // setTimeout(function() {new ElementPopper(a,b);}), 500);=0A= =0A= //=0A= var ElementPopper =3D function(popnode, content, config, popperId) {=0A= =0A= var that =3D this;=0A= =0A= // Inner functions=0A= // If target is popnode or one of its children, returns popnode; = otherwise, null=0A= function getPopTarget(target) {=0A= while (target && !utils.hasClass(target, "popnode")) {=0A= target =3D target.parentNode;=0A= }=0A= return target;=0A= };=0A= =0A= // Use inner functions here because removeEvent requires a reference = to the=0A= // function object passed to addEvent, and we need to use closure to = maintain scope.=0A= =0A= // Show popper and start tracking mouse motions=0A= var handlePop =3D function(e) {=0A= var target =3D getPopTarget(utils.getTargetObj(e));=0A= =0A= if (target) {=0A= // If Ajax URL is supplied, then fetch URL.=0A= // If AJAX URL is a function, the URL is the return value of = the function=0A= // Otherwise AJAX URL must be a string=0A= // When AJAX call succeeds, pop up the content. If there's a = contentFunction, the content is=0A= // the result of applying the contentFunction to the AJAX return = data; otherwise, it's just=0A= // the AJAX return data itself.=0A= //=0A= if (that.url) {=0A= var url =3D (typeof(that.url) =3D=3D 'function') ? = that.url(target) : that.url;=0A= =0A= jQuery.ajax({=0A= cache: false,=0A= 'url': url,=0A= success: function(data, textStatus) {=0A= doPop(target, data, textStatus);=0A= }=0A= });=0A= } else {=0A= doPop(target);=0A= }=0A= =0A= // Set up to listen for mouse out=0A= // This is the node currently being handled; it's cleared when=0A= // the user mouses out.=0A= that.handlingNode =3D target;=0A= =0A= utils.removeEvent(target, "mousemove", handlePop);=0A= utils.addEvent(document.body, "mousemove", trackMouse);=0A= utils.addEvent(document.body, "mouseout", trackMouse);=0A= }=0A= }=0A= =0A= var doPop =3D function(target, data, status) {=0A= =0A= // Pop, shift listener to document body=0A= if (target) {=0A= that.timer =3D setTimeout(function() {=0A= // If we're still waiting for a pop, do the pop.=0A= // We're only waiting for a pop when handlingNode is set.=0A= if (target =3D=3D that.handlingNode) {=0A= that.thePopper.showBy(that.contentFunction(target, data, = status), target, that.direction);=0A= } else {=0A= // Ignore the pop request, because we're no longer = interested in this pop.=0A= }=0A= that.timer =3D null; =0A= }, that.delay);=0A= =0A= }=0A= };=0A= =0A= // Unpop, shift listener back to popnode=0A= var trackMouse =3D function(e) {=0A= var target =3D getPopTarget(utils.getTargetObj(e));=0A= =0A= // If mouse left document.body, or the target's not over the = popnode, hide.=0A= if (e.type =3D=3D "mouseout" || target =3D=3D null) {=0A= // Clear pop timer if it hasn't popped=0A= if (that.timer) {=0A= window.clearTimeout(that.timer);=0A= that.timer =3D null;=0A= }=0A= that.thePopper.hide();=0A= that.handlingNode =3D null;=0A= =0A= utils.removeEvent(document.body, "mousemove", trackMouse);=0A= utils.removeEvent(document.body, "mouseout", trackMouse);=0A= utils.addEvent(popnode, "mousemove", handlePop);=0A= }=0A= };=0A= =0A= // END inner functions=0A= =0A= //=0A= // ctor main=0A= //=0A= =0A= // Support new signature ElementPopper(element, {config...}); in = that case, "content" is a config object,=0A= // all other arguments are ignored, and config.content must be set =0A= if (typeof(content) =3D=3D 'object') {=0A= config =3D content;=0A= content =3D config.content;=0A= }=0A= =0A= // If a content URL is defined (AJAX URL string or function that = returns URL), remember it=0A= if (config && config.url) {=0A= this.url =3D config.url;=0A= }=0A= =0A= // If content is a string, make it a function that returns the = string.=0A= // If it's a dom node, make it a function that returns the dom = node's innerHTML=0A= // If content is undefined, then assume data is coming from AJAX = callback=0A= if (typeof(content) =3D=3D 'undefined') {=0A= this.contentFunction =3D function(target, data, status) { return = data };=0A= } else if (typeof(content) =3D=3D 'string') {=0A= this.contentFunction =3D function() { return content; }=0A= } else if (content.innerHTML) {=0A= this.contentFunction =3D function() { return content.innerHTML; }=0A= } else if (typeof(content) =3D=3D 'function') {=0A= this.contentFunction =3D content; // Better be a function...=0A= }=0A= =0A= // Backward compatibility: "config" arg used to be "direction", so=0A= // interpret it as "direction" if config is a number.=0A= // Otherwise parse out config info=0A= if (typeof(config) =3D=3D=3D 'undefined') {=0A= config =3D {=0A= direction: PopDiv.POP_LEFT,=0A= delay: 0=0A= }=0A= }=0A= =0A= if (typeof(config) =3D=3D 'number') {=0A= this.direction =3D config;=0A= } else {=0A= this.direction =3D (typeof(config.direction) !=3D 'undefined') ? = config.direction : PopDiv.POP_LEFT;=0A= this.delay =3D config.delay || 0;=0A= }=0A= this.popperId =3D config.popperId || popperId || ("popper" + = (ElementPopper.popIndex++)); =0A= =0A= // Create the popper=0A= this.thePopper =3D new PopDiv(this.popperId);=0A= var popdiv =3D $(this.popperId);=0A= =0A= // FIXME: Is this necessary? I think it's maybe wrong!=0A= if (popdiv) {=0A= utils.addClass(popdiv, "popnode");=0A= }=0A= =0A= // Get popnode if it's an id string=0A= if (typeof(popnode) =3D=3D 'string') {=0A= popnode =3D $(popnode);=0A= if (!popnode) {=0A= throw "ElementPopper: id not found";=0A= }=0A= }=0A= this.popnode =3D popnode;=0A= this.timer =3D null; // Only exists when waiting for a pop=0A= =0A= // When the user mouses over target, pop it up=0A= utils.addEvent(popnode, "mousemove", handlePop);=0A= }=0A= =0A= ElementPopper.popIndex =3D 0;=0A= =0A= ElementPopper.prototype =3D {=0A= setDelay: function(delay) {=0A= this.delay =3D delay;=0A= },=0A= getDelay: function() {=0A= return delay;=0A= }=0A= };=0A= =0A= =0A= =0A= // Requires: ElementPopper_JS, EventDispatcher_JS=0A= =0A= //=0A= // A DeferredElementPopper creates an ElementPopper on any node with a = given className the first time the=0A= // node receives a mouseover event. It collects all of the poppers it = creates (in an array), and=0A= // remembers the dispatcher rule that invokes the initialization.=0A= //=0A= // "content" is the same as "content" for ElementPopper (see which)=0A= //=0A= DeferredElementPopper =3D function(className, config) {=0A= var that =3D this;=0A= this.config =3D config;=0A= this.poppers =3D [];=0A= this.dispatcher =3D new EventDispatcher("mouseover", className, = function(event, udata, dispatcher) {=0A= if (!this._popup_init) {=0A= this._popup_init =3D 1;=0A= that.poppers[that.poppers.length] =3D new = ElementPopper(this, that.config.content, that.config);=0A= }=0A= });=0A= =0A= }=0A= DeferredElementPopper.prototype =3D {=0A= debug: function() {=0A= var s =3D "";=0A= for (var i =3D 0; i < this.poppers.length; i++) {=0A= var z =3D this.poppers[i];=0A= s +=3D i + ": ";=0A= s +=3D z.popnode.innerText + "(" + = z.popnode.getAttribute("title") +"); ";=0A= }=0A= alert(s);=0A= }=0A= };=0A= =0A= =0A= //=0A= // A EventDispatcher does a popup on demand based on a classname on an = element.=0A= // Every mouse motion on the page notifies EventDispatcher that an event = occurred.=0A= // Any time an event occurs that has one of EventDispatcher's classnames = on it,=0A= // the handlers associated with that className are executed.=0A= //=0A= // EventDispatcher is designed for popups, but can be used for anything; = the handler=0A= // is a generic function:=0A= // handler(event, udata, dispatchrule)=0A= // is the platform event object; use utils.getTargetObj() to get = its target=0A= // is the udata that was passed when that handler was set up.=0A= // is the EventDispatcher object; it is the dictionary=0A= // {eventType, className, handler, udata} describing the popper behavior.=0A= //=0A= // dispatchrule.remove() [TBD] removes the rule from the event dispatcher=0A= //=0A= // When the callback occurs, is the target element. =0A= =0A= EventDispatcher =3D function(eventType, className, handler, udata) {=0A= =0A= // Start PP listening for this event=0A= if (!EventDispatcher.events) {=0A= EventDispatcher.events =3D {};=0A= }=0A= =0A= // If first definition for this event type, listen for it=0A= if (!EventDispatcher.events[eventType]) {=0A= EventDispatcher.events[eventType] =3D {};=0A= utils.addEvent(document.body, eventType, = EventDispatcher.handleEvent);=0A= }=0A= =0A= // Index of all class names managed by PP=0A= if (!EventDispatcher.classNames[className]) {=0A= EventDispatcher.classNames[className] =3D 1;=0A= }=0A= =0A= // ev.classNames are the classes that listen for this event=0A= var ev =3D EventDispatcher.events[eventType];=0A= if (!ev.classNames) {=0A= ev.classNames =3D {};=0A= }=0A= =0A= // Add handler for this class=0A= if (!ev.classNames[className]) {=0A= ev.classNames[className] =3D [];=0A= }=0A= =0A= this.eventType =3D eventType;=0A= this.className =3D className;=0A= this.handler =3D handler;=0A= this.udata =3D udata || null;=0A= =0A= var c =3D ev.classNames[className];=0A= c[c.length] =3D this;=0A= }=0A= =0A= EventDispatcher.events =3D {}=0A= EventDispatcher.classNames =3D {}=0A= =0A= EventDispatcher.handleEvent =3D function(e) {=0A= =0A= if (!EventDispatcher.events[e.type]) { return; } // TODO: Remove = event listener here=0A= =0A= var t =3D utils.getTargetObj(e);=0A= if (t.className) {=0A= var theClasses =3D t.className.split(/\s+/);=0A= for (var c in theClasses) {=0A= if (EventDispatcher.classNames[theClasses[c]]) {=0A= EventDispatcher.dispatch(e, t, theClasses[c]);=0A= }=0A= }=0A= }=0A= }=0A= =0A= EventDispatcher.dispatch =3D function(e, t, className) {=0A= if (!EventDispatcher.events[e.type]) return;=0A= var ev =3D EventDispatcher.events[e.type];=0A= if (!ev.classNames || !ev.classNames[className]) return;=0A= var poppers =3D ev.classNames[className];=0A= for (var i =3D 0; i < poppers.length; i++) {=0A= poppers[i].handleEvent(t, e);=0A= }=0A= }=0A= =0A= EventDispatcher.prototype =3D {=0A= handleEvent: function(target, event) {=0A= this.handler.call(target, event, this.udata, this);=0A= }=0A= }=0A= =0A= =0A= =0A= Portal.Portlet.LinkListPageSection =3D = Portal.Portlet.NCBIPageSection.extend ({ init: function (path, name, notifier){ this.base (path, name, notifier); },=0A= =0A= "getPortletPath" : function(){ return (this.realname + ".NCBIPageSection"); }=0A= });=0A= (function( $ ){ // pass in $ to self exec anon fn // on page ready $( function() { $('li.brieflinkpopper').each( function(){=0A= var $this =3D $( this );=0A= var popper =3D $this.find('a.brieflinkpopperctrl') ;=0A= var popnode =3D $this.find('div.brieflinkpop');=0A= var popid =3D popnode.attr('id') || = $.ui.jig._generateId('brieflinkpop');=0A= popnode.attr('id', popid);=0A= popper.ncbipopper({=0A= destSelector: "#" + popid,=0A= destPosition: 'top right', =0A= triggerPosition: 'middle left', =0A= hasArrow: true, =0A= arrowDirection: 'right',=0A= isTriggerElementCloseClick: false,=0A= adjustFit: 'none', openAnimation: 'none',=0A= closeAnimation: 'none',=0A= delayTimeout : 130=0A= });=0A= }); // end each loop =0A= });// end on page ready=0A= })( jQuery ); Portal.Portlet.BriefLinkPageSection =3D = Portal.Portlet.LinkListPageSection.extend({ init: function(path, name, notifier) { console.info("Created BriefLinkPageSection"); this.base(path, name, notifier); }, =09 "getPortletPath" : function(){ return (this.realname + ".LinkListPageSection.NCBIPageSection"); } =09 });=0A= Portal.Portlet.DiscoveryDbLinks =3D = Portal.Portlet.BriefLinkPageSection.extend({ =20 init: function(path, name, notifier) { this.base(path, name, notifier); }, =09 "getPortletPath" : function(){ return (this.realname + = ".BriefLinkPageSection.LinkListPageSection.NCBIPageSection"); } });=0A= Portal.Portlet.Pubmed_DiscoveryDbLinks =3D = Portal.Portlet.DiscoveryDbLinks.extend({ =20 init: function(path, name, notifier) { this.base(path, name, notifier); },=0A= =0A= "getPortletPath" : function(){ return (this.realname + = ".DiscoveryDbLinks.BriefLinkPageSection.LinkListPageSection.NCBIPageSecti= on"); } });=0A= Portal.Portlet.Pubmed_Discovery_RA =3D = Portal.Portlet.BriefLinkPageSection.extend({ =20 init: function(path, name, notifier) { console.info("Created Pubmed_Discovery_RA"); this.base(path, name, notifier); }, =09 /*SetPortletName: function(){ Portal.Portlet.BriefLinkPageSection.portletname =3D = 'Pubmed_Discovery_RA'; }*/=0A= =0A= "getPortletPath" : function(){ return (this.realname + = ".BriefLinkPageSection.LinkListPageSection.NCBIPageSection"); } });=0A= Portal.Portlet.Entrez_RVBasicReport =3D Portal.Portlet.extend({ =09 init: function(path, name, notifier) { console.info("Created report portlet"); this.base(path, name, notifier); }, =09 send: { 'ItemSelectionChanged': null,=0A= 'ClearIdList': null,=0A= 'Cmd': null }, =09 listen: { "uid" : function(e, target, name){=0A= this.UidClick(e, target, name); },=0A= =0A= "RemoveClip" : function(e, target, name){=0A= this.ClipRemoveClick(e, target, name); =20 } },=0A= =0A= 'UidClick': function(e, target, name){=09 this.send.ItemSelectionChanged( { 'id': target.value,=0A= 'selected': target.checked });=0A= },=0A= =09 'ClipRemoveClick': function(e, target, name){ this.send.ClearIdList(); this.send.Cmd({'cmd': 'deletefromclipboard'});=0A= this.send.ItemSelectionChanged( { 'id': target.getAttribute('uid'),=0A= 'selected': true });=0A= Portal.requestSubmit(); } }); =20 =0A= Portal.Portlet.Pubmed_RVAbstract =3D = Portal.Portlet.Entrez_RVBasicReport.extend({ init: function(path, name, notifier) { this.base(path, name, notifier); },=0A= =0A= send: { 'ItemSelectionChanged': null, 'ClearIdList': null, 'Cmd': null, 'AppendTerm': null } }); =20 function HistViewTerm(term, op, num) { Portal.$send('AppendTerm', {'op': op, 'term': term}) } =0A= var AL_XMLHTTPOBJ; var AL_Cache =3D new Object(); var AL_cache_key; var AL_cur_menu; var AL_CgiUrl =3D "/entrez/utils/abstract_link.fcgi"; function AL_getXMLHTTP() { try { return new ActiveXObject("Msxml2.XMLHTTP") } catch(e1) {=20 try {=20 return new ActiveXObject("Microsoft.XMLHTTP") } catch(e2) { return typeof XMLHttpRequest !=3D "undefined" ?=20 new XMLHttpRequest() : null; } } } var PopUpMenu2_LocalConfig_ActiveLConfig =3D [ ["ShowCloseIcon","yes"], = ["Help","window.open('/entrez/query/static/popup.html','Links_Help','resi= zable=3Dno,scrollbars=3Dyes,toolbar=3Dno,location=3Dno,directories=3Dno,s= tatus=3Dno,menubar=3Dno,copyhistory=3Dno,alwaysRaised=3Dno,depend=3Dno,wi= dth=3D400,height=3D500');"], ["TitleText"," Links "] ] AL_wait_menu =3D [ ["UseLocalConfig","ActiveLConfig","",""], ["Wait","window.top.location=3D'http://www.pubmed.gov'","",""] ] function AL_get(self, sec, term) { if (!AL_XMLHTTPOBJ && !(AL_XMLHTTPOBJ =3D AL_getXMLHTTP())) return; AL_cache_key =3D sec + '$' + term; if(AL_cur_menu =3D AL_Cache[AL_cache_key]) { PopUpMenu2_Set(AL_cur_menu);=20 } else { // ask server // write "wait" PopUpMenu2_Set(AL_wait_menu);=20 if(AL_XMLHTTPOBJ.readyState) AL_XMLHTTPOBJ.abort(); AL_XMLHTTPOBJ.onreadystatechange=3Dfunction() { if(AL_XMLHTTPOBJ.readyState =3D=3D 4 && AL_XMLHTTPOBJ.status =3D=3D = 200) { eval(AL_XMLHTTPOBJ.responseText); // fill AL_cur_menu PopUpMenu2_Set(AL_Cache[AL_cache_key] =3D AL_cur_menu);=20 } }; AL_XMLHTTPOBJ.open("GET",=20 = location.protocol+"//"+location.host+AL_CgiUrl+"?db=3Dpubmed&base=3D1&sec= =3D"+sec+"&term=3D"+encodeURIComponent(term),=20 true); AL_XMLHTTPOBJ.send(null) } =20 } =0A= Portal.Portlet.Entrez_ResultsController =3D Portal.Portlet.extend({ init: function(path, name, notifier) { console.info("Created Entrez_ResultsController"); this.base(path, name, notifier); },=09 =09 send: {=0A= 'Cmd': null }, =09 listen: {=0A= =0A= /* page events */=0A= =0A= "RemoveFromClipboard": function(e, target, name){=0A= this.RemoveFromClipboardClick(e, target, name);=0A= },=0A= =20 /* messages */=0A= =0A= 'Cmd': function(sMessage, oData, sSrc){=0A= this.ReceivedCmd(sMessage, oData, sSrc); }, =0A= 'SelectedItemCountChanged' : function(sMessage, oData, sSrc){ this.ItemSelectionChangedMsg(sMessage, oData, sSrc); },=0A= =0A= // currently sent by searchbox pubmed in journals=20 'RunLastQuery' : function(sMessage, oData, sSrc){ if (this.getInput("RunLastQuery")){ this.setValue ("RunLastQuery", 'true'); } } =09 },//listen=0A= =0A= 'RemoveFromClipboardClick': function(e, target, name){=0A= if(confirm("Are you sure you want to delete these items from the = Clipboard?")){ this.send.Cmd({'cmd': 'deletefromclipboard'}); Portal.requestSubmit(); =20 }=0A= },=0A= =09 // fix to not show remove selected items message when Remove from = clipboard was clicked directly on one item=0A= 'ReceivedCmd': function(sMessage, oData, sSrc){ if (oData.cmd =3D=3D 'deletefromclipboard'){=0A= Portal.Portlet.Entrez_ResultsController.RemoveOneClip =3D true;=0A= } },=0A= =0A= 'ItemSelectionChangedMsg': function(sMessage, oData, sSrc){=0A= // do not show any messages if one item from clipbaord was removed = with direct click.=0A= if (Portal.Portlet.Entrez_ResultsController.RemoveOneClip){=0A= Portal.Portlet.Entrez_ResultsController.RemoveOneClip =3D false;=0A= }=0A= else{ this.SelectedItemsMsg(oData.count);=0A= this.ClipRemoveMsg(oData.count);=0A= }=0A= },=0A= =0A= 'SelectedItemsMsg': function(count){=0A= SelMsgNode =3D document.getElementById('result_sel');=0A= if (SelMsgNode){=0A= if (count > 0){=0A= SelMsgNode.className =3D 'result_sel'; SelMsgNode.innerHTML =3D "Selected: " + count; } else {=0A= SelMsgNode.className =3D 'none'; SelMsgNode.innerHTML =3D ""; }=0A= }=0A= },=0A= =0A= 'ClipRemoveMsg': function(count){ ClipRemNode =3D document.getElementById('rem_clips');=0A= if (ClipRemNode){=0A= if (count > 0){=0A= ClipRemNode.innerHTML =3D "Remove selected items";=0A= }=0A= else {=0A= ClipRemNode.innerHTML =3D "Remove all items";=0A= }=0A= }=0A= },=0A= =0A= 'ResultCount': function(){=0A= var totalCount =3D parseInt(this.getValue("ResultCount"));=0A= totalCount =3D totalCount > 0 ? totalCount : 0;=0A= return totalCount;=0A= } },=0A= {=0A= RemoveOneClip: false=0A= });=0A= =0A= function getEntrezResultCount() { return $PN('Entrez_ResultsController').ResultCount(); } =0A= Portal.Portlet.Pubmed_ResultsController =3D = Portal.Portlet.Entrez_ResultsController.extend({ init: function(path, name, notifier) { this.base(path, name, notifier); }=0A= });=0A= =0A= function getEntrezResultCount() { return $PN('Pubmed_ResultsController').ResultCount(); }=0A= Portal.Portlet.Entrez_Messages =3D Portal.Portlet.extend({ init: function(path, name, notifier) { this.base(path, name, notifier);=0A= =0A= this.setMsgAreaClassName(); }, =09 listen: { /* messages from message bus*/ =09 'AddUserMessage' : function(sMessage, oData, sSrc) {=0A= // create new message node var msgnode =3D document.createElement('li');=0A= if (oData.type !=3D ''){=0A= msgnode.className =3D oData.type; =0A= }=0A= if (oData.name !=3D ''){ msgnode.id =3D oData.name;=20 }=0A= msgnode.innerHTML =3D oData.msg;=0A= =0A= // add new node as first message in message block (not ads that = look like messages)=0A= var parent =3D document.getElementById('msgportlet');=0A= if (parent){=0A= var oldnode =3D document.getElementById(oData.name);=0A= if (oldnode){=0A= parent.removeChild(oldnode);=0A= }=0A= var firstchild =3D parent.firstChild;=0A= if (firstchild){=0A= parent.insertBefore(msgnode, firstchild);=0A= }=0A= else{=0A= parent.appendChild(msgnode);=0A= }=0A= this.setMsgAreaClassName('true');=0A= } },=0A= =0A= 'RemoveUserMessage' : function(sMessage, oData, sSrc) {=0A= var msgnode =3D document.getElementById(oData.name); if (msgnode){=0A= var parent =3D document.getElementById('msgportlet'); =0A= if (parent){=0A= parent.removeChild(msgnode);=0A= this.setMsgAreaClassName();=0A= }=0A= } }=0A= }, // end listen=0A= =0A= 'setMsgAreaClassName' : function(hasMsg){=0A= var msgarea =3D document.getElementById('messagearea');=0A= if (msgarea){=0A= var msgclass =3D "empty";=0A= =0A= // if a message was added, hasMsg is set to true at call time = to avoid checks. =0A= // by default, hasMsg is false.=0A= if (hasMsg =3D=3D 'true'){=0A= msgclass =3D "messagearea";=0A= }=0A= else if (msgarea.getElementsByTagName('li').length > 0){=0A= msgclass =3D "messagearea"; =0A= }=0A= =0A= msgarea.className =3D msgclass;=0A= }=0A= } // end setMsgAreaClassName=0A= });=0A= =0A= =0A= Portal.Portlet.Entrez_DisplayBar =3D Portal.Portlet.extend({ init: function(path, name, notifier) { console.info("Created DisplayBar"); this.base(path, name, notifier); =09 // for back button compatibility reset values when page loads=0A= if (this.getInput("Presentation")){=0A= this.setValue("Presentation", this.getValue("LastPresentation"));=0A= Portal.Portlet.Entrez_DisplayBar.Presentation =3D = this.getValue("LastPresentation");=0A= } if (this.getInput("Format")){ this.setValue("Format", this.getValue("LastFormat")); Portal.Portlet.Entrez_DisplayBar.Format =3D = this.getValue("LastFormat"); }=0A= if (this.getInput("PageSize")){ this.setValue("PageSize", this.getValue("LastPageSize"));=0A= Portal.Portlet.Entrez_DisplayBar.PageSize =3D = this.getValue("LastPageSize"); }=0A= if (this.getInput("Sort")){ this.setValue("Sort", this.getValue("LastSort"));=0A= Portal.Portlet.Entrez_DisplayBar.Sort =3D = this.getValue("LastSort"); }=0A= this.ResetDisplaySelections();=0A= this.ResetSendToSelection();=0A= =20 }, =09 =09 send: { 'Cmd': null,=20 'PageSizeChanged': null,=0A= 'ResetSendTo': null,=0A= 'ResetCurrPage': null }, =09 =09 =09 listen: { =09 /* browser events */ =09 "sPresentation": function(e, target, name){=0A= this.PresentationClick(e, target, name);=20 },=0A= =0A= "sPresentation2": function(e, target, name){ this.PresentationClick(e, target, name);=20 }, =09 "sPageSize": function(e, target, name){ =0A= this.PageSizeClick(e, target, name); },=0A= =0A= "sPageSize2": function(e, target, name){=09 this.PageSizeClick(e, target, name); }, =09 "sSort": function(e, target, name){=0A= this.SortClick(e, target, name); },=0A= =0A= "sSort2": function(e, target, name){ this.SortClick(e, target, name); },=0A= =0A= "SetDisplay": function(e, target, name){ this.DisplayChange(e, target, name);=20 }, =09 "SendTo": function(e, target, name){ var sendto =3D target.value;=0A= var idx =3D target.getAttribute('sid') > 10? "2" : ""; this.SendToClick(sendto, idx, e, target, name);=20 },=0A= =0A= "SendToSubmit": function(e, target, name){=0A= var cmd =3D target.getAttribute('cmd').toLowerCase();=0A= var idx =3D target.getAttribute('sid') > 10? "2" : ""; this.SendToSubmitted(cmd, idx, e, target, name); =0A= }, =09 /* messages from message bus*/ =09 'ResetSendTo' : function(sMessage, oData, sSrc) {=0A= this.ResetSendToSelection(); } =09 }, // end listen=0A= =0A= =0A= =0A= /* functions */=0A= =0A= 'PresentationClick': function(e, target, name){ Portal.Portlet.Entrez_DisplayBar.Presentation =3D target.value;=0A= Portal.Portlet.Entrez_DisplayBar.Format =3D = target.getAttribute('format');=0A= },=0A= =0A= 'PageSizeClick': function(e, target, name){=20 Portal.Portlet.Entrez_DisplayBar.PageSize =3D target.value;=0A= },=0A= =0A= 'SortClick': function(e, target, name){ Portal.Portlet.Entrez_DisplayBar.Sort =3D target.value;=0A= },=0A= =0A= 'DisplayChange': function(e, target, name){=0A= this.send.Cmd({'cmd': 'displaychanged'});=0A= =0A= this.SetPresentationChange(e, target, name);=0A= this.SetPageSizeChange(e, target, name);=0A= this.SetSortChange(e, target, name);=0A= =0A= Portal.requestSubmit();=0A= }, =09 'SetPresentationChange': function(e, target, name){ this.setValue("Presentation", = Portal.Portlet.Entrez_DisplayBar.Presentation); this.setValue("Format", Portal.Portlet.Entrez_DisplayBar.Format); },=0A= =09 'SetPageSizeChange': function(e, target, name){=0A= this.setValue("PageSize", = Portal.Portlet.Entrez_DisplayBar.PageSize); if (this.getValue("PageSize") !=3D this.getValue("LastPageSize")){ //send PageSizeChanged=0A= this.send.PageSizeChanged({=0A= 'size': this.getValue("PageSize"),=0A= 'oldsize': this.getValue("LastPageSize")=0A= }); =0A= } }, =09 'SetSortChange': function(e, target, name){=0A= if (this.getInput("Sort")){ this.setValue("Sort", Portal.Portlet.Entrez_DisplayBar.Sort);=0A= if (this.getValue("Sort") !=3D this.getValue("LastSort")){=0A= // ask to reset CurrPage =0A= this.send.ResetCurrPage();=0A= }=0A= } =09 }, =09 'SendToClick': function(sendto, idx, e, target, name) { if(sendto.toLowerCase() =3D=3D 'file'){ this.SendToFile(sendto, idx); } else if(sendto.toLowerCase() =3D=3D 'addtocollections'){ this.SendToCollections(sendto, idx); } else if(sendto.toLowerCase() =3D=3D 'addtoclipboard'){=0A= this.SendToClipboard(sendto, idx); } },=0A= =0A= 'SendToSubmitted': function(cmd, idx, e, target, name){ if (cmd =3D=3D 'file'){ this.SendToFileSubmitted(cmd, idx, target); }=0A= this.send.Cmd({'cmd': cmd}); Portal.requestSubmit();=0A= },=0A= =0A= 'ResetSendToSelection': function(){=0A= var SendToInputs =3D this.getInputs("SendTo");=0A= for (var j =3D 0; j < SendToInputs.length; j++){ if (SendToInputs[j].checked){=0A= SendToInputs[j].checked =3D false; }=0A= }=0A= },=0A= =0A= 'SendToFile': function(name, idx){=0A= // generate content=0A= var count =3D this.getItemCount();=0A= var content =3D 'Download ' + count + ' items.';=0A= this.addSendToHintContent(name, idx, content);=0A= },=0A= =0A= 'SendToCollections': function(name, idx){=0A= // generate content=0A= var count =3D this.getItemCount();=0A= var content=3D 'Add ';=0A= if (count > = Portal.Portlet.Entrez_DisplayBar.CollectionsUpperLimit){=0A= content +=3D "the first " + = Portal.Portlet.Entrez_DisplayBar.CollectionsUpperLimitText;=0A= }=0A= else{=0A= content +=3D count;=0A= }=0A= content +=3D " items.";=0A= this.addSendToHintContent(name, idx, content); =0A= },=0A= =0A= 'SendToClipboard': function(name, idx){=0A= // generate content var count =3D this.getItemCount(); var content=3D 'Add '; if (count > Portal.Portlet.Entrez_DisplayBar.ClipboardLimit){ content +=3D "the first " + = Portal.Portlet.Entrez_DisplayBar.ClipboardLimit; } else{ content +=3D count; } content +=3D " items."; this.addSendToHintContent(name, idx, content);=0A= },=0A= =0A= 'getItemCount': function(){=0A= // ask for selected items count from DbConnector=0A= var selectedItemCount =3D getEntrezSelectedItemCount();=0A= if (selectedItemCount > 0){=0A= return selectedItemCount;=0A= }=0A= else{=0A= // ask for result count from Entrez_ResultsController=0A= return getEntrezResultCount();=0A= }=0A= },=0A= =0A= 'addSendToHintContent': function(name, idx, content){ var hintNode =3D document.getElementById("submenu_" + name + = "_hint" + idx);=0A= if (hintNode){=0A= hintNode.innerHTML =3D content;=0A= hintNode.className =3D 'hint';=0A= } },=0A= =0A= 'AddSendToSubmitEvent': function(){=0A= // add event for SendTo submit button click. =0A= // This call is needed if the position of the submit button node = has changed in relation to its parent node.=20 this.addEvent("SendToSubmit", "click", function(e, target, name) = {=0A= var cmd =3D target.getAttribute('cmd');=0A= this.SendToSubmitted(cmd, e, target, name); =0A= }, false);=0A= },=0A= =0A= 'SendToFileSubmitted': function(cmd, idx, target){=0A= if (this.getInput("FFormat" + idx)){=0A= this.setValue("FileFormat", this.getValue("FFormat" + idx));=0A= }=0A= if (this.getInput("FSort" + idx)){ this.setValue("FileSort", this.getValue("FSort" + idx)); }=0A= },=0A= =0A= 'ResetDisplaySelections': function(){=0A= if (this.getInput("Presentation")){=0A= var selection =3D = this.getValue("Presentation").toLowerCase() + = this.getValue("Format").toLowerCase();=0A= if (document.getElementById(selection)){=0A= document.getElementById(selection).checked =3D true;=0A= }=0A= // bottom display bar=0A= if (document.getElementById(selection + "2")){ document.getElementById(selection + "2").checked =3D = true; }=0A= =0A= }=0A= if (this.getInput("PageSize")){ var selection =3D 'ps' + this.getValue("PageSize"); if (document.getElementById(selection)){ document.getElementById(selection).checked =3D true; }=0A= // bottom display bar if (document.getElementById(selection + "2")){ document.getElementById(selection + "2").checked =3D = true; } }=0A= if (this.getInput("Sort")){ var selection =3D this.getValue("Sort") || 'none';=20 if (document.getElementById(selection)){ document.getElementById(selection).checked =3D true; }=0A= // bottom display bar if (document.getElementById(selection + "2")){ document.getElementById(selection + "2").checked =3D = true; } }=0A= }=0A= =09 },=0A= {=0A= Presentation: '',=0A= Format: '',=0A= PageSize: '',=0A= Sort: '',=0A= CollectionsUpperLimit: 5000, CollectionsUpperLimitText: '5,000',=0A= ClipboardLimit: 500=0A= }); =0A= Portal.Portlet.Pubmed_DisplayBar =3D = Portal.Portlet.Entrez_DisplayBar.extend({ init: function(path, name, notifier) { this.base(path, name, notifier); },=0A= =0A= send: { 'Cmd': null,=20 'PageSizeChanged': null, 'ResetSendTo': null, 'ResetCurrPage': null, 'SendMail': null }, =09 /* functions */ 'SendToClick': function(sendto, idx, e, target, name) { if (sendto.toLowerCase() =3D=3D 'order'){ } else if (sendto.toLowerCase() =3D=3D 'mail'){=0A= this.SendToMail(sendto, idx); } else this.base(sendto, idx, e, target, name); },=0A= =0A= 'SendToMail': function(sendto, idx){=0A= // hide any previous alert messages =0A= var alertnode =3D document.getElementById("email_alert" + idx); alertnode.className =3D 'hidden';=0A= =0A= // ask for selected items count from DbConnector var selectedItemCount =3D getEntrezSelectedItemCount() || 0;=0A= var descNode =3D document.getElementById("email_desc" + idx);=0A= =20 // if ids are selected, save old description, and create new = description=0A= if (selectedItemCount > 0){=0A= if (Portal.Portlet.Pubmed_DisplayBar.Description =3D=3D '') Portal.Portlet.Pubmed_DisplayBar.Description =3D = descNode.innerHTML;=0A= descNode.innerHTML =3D selectedItemCount + " selected item" + = (selectedItemCount > 1? "s" : ""); }=0A= // if ids are not selected, and an old description is present, = restore that else{=0A= if (Portal.Portlet.Pubmed_DisplayBar.Description !=3D '')=0A= descNode.innerText =3D = Portal.Portlet.Pubmed_DisplayBar.Description;=0A= }=0A= =0A= // get total number of items about to be sent=0A= var count =3D this.getItemCount();=0A= =0A= // don't show email count and start options if less than 5 items = are in search result, or user has selected some items=0A= if (document.getElementById("email_count_option" + idx)){=0A= if (count <=3D 5 || selectedItemCount > 1){=0A= document.getElementById("email_count_option" + = idx).style.display =3D "none";=0A= }=0A= else {=0A= document.getElementById("email_count_option" + = idx).style.display =3D "list-item";=0A= }=0A= }=0A= if (document.getElementById("email_start_option" + idx)){=0A= if (count <=3D 5 || selectedItemCount > 1){=0A= document.getElementById("email_start_option" + = idx).style.display =3D "none";=0A= }=0A= else {=0A= document.getElementById("email_start_option" + = idx).style.display =3D "list-item";=0A= }=0A= }=0A= =0A= // don't show sort option if 1 item is selected if (document.getElementById("email_sort_option" + idx)){ if (count =3D=3D 1){ document.getElementById("email_sort_option" + = idx).style.display =3D "none"; } else { document.getElementById("email_sort_option" + = idx).style.display =3D "list-item"; } }=0A= }, =09 'SendToSubmitted': function(cmd, idx, e, target, name){ if (cmd.toLowerCase() =3D=3D 'mail'){ this.SendToEmailSubmitted(cmd, idx, target);=0A= } else{ this.base(cmd, idx, e, target, name);=0A= } }, =09 'SendToEmailSubmitted': function(cmd, idx, target){=0A= =0A= var alertnode =3D document.getElementById("email_alert" + idx);=0A= alertnode.className =3D 'hidden';=0A= =0A= var email =3D document.getElementById("email_address" + = idx).value.replace(/^\s*|\s*$/g,''); if (email =3D=3D ''){=0A= alertnode.innerHTML =3D 'Please provide an email address.';=0A= alertnode.className =3D 'email_alert';=0A= }=0A= else {=0A= var emailRegexp =3D = /^[A-Za-z0-9._\'%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/;=0A= if (emailRegexp.test(email)){=0A= this.SendMailInfo(cmd, idx, target, email); =0A= }=0A= else {=0A= alertnode.innerHTML =3D 'The email address is invalid!'; alertnode.className =3D 'email_alert';=0A= }=0A= } =09 =20 },=0A= =0A= 'SendMailInfo': function(cmd, idx, target, email){=0A= // collect options, description and extra text var emailFormat =3D document.getElementById("email_format" + idx); var report =3D emailFormat.value; var format =3D = emailFormat.options[emailFormat.selectedIndex].getAttribute('format'); var sort =3D document.getElementById("email_sort" + idx)? = document.getElementById("email_sort").value : ""; var count =3D document.getElementById("email_count" + idx)? = document.getElementById("email_count").value : "5";=0A= var start =3D document.getElementById("email_start" + idx)? = document.getElementById("email_start").value : "1"; var text =3D document.getElementById("email_add_text" + idx).value; var querykey =3D target.getAttribute('qk'); var querydesc =3D document.getElementById("email_desc" + = idx).innerHTML;=0A= var suppData =3D jQuery('#chkSupplementalData' + = idx).attr('checked');=0A= if (suppData && report =3D=3D 'abstract' && format !=3D 'text' ) = report =3D 'AbstractWithSupp';=0A= =20 // send message to email portlet with data this.send.SendMail({ 'report' : report, 'format' : format, 'count' : count,=0A= 'start' : start, 'sort' : sort, 'email' : email, 'text' : text, 'querykey': querykey, 'querydesc': querydesc /*,=0A= 'suppData' : suppData */ });=0A= =20 this.send.Cmd({'cmd': cmd}); Portal.requestSubmit();=0A= } =09 },=0A= {=0A= Description: ''=0A= });=0A= =0A= jQuery(document).ready(function(){=0A= jQuery('#email_format').bind('change',emailFormatChanged);=0A= jQuery('#email_format2').bind('change',emailFormatChanged);=0A= //emailFormatChanged(); //initial state=0A= jQuery('#email_format').trigger('change');=0A= jQuery('#email_format2').trigger('change');=0A= });=0A= =0A= function emailFormatChanged(){=0A= var chkSpan =3D jQuery(this).next(); if (jQuery(this).val() =3D=3D 'abstract' && = jQuery(this).attr('options')[jQuery(this).attr('selectedIndex')].getAttri= bute('format') !=3D 'text' ) chkSpan.css('visibility','visible') else chkSpan.css('visibility','hidden')=0A= =0A= } =0A= Portal.Portlet.Entrez_SearchBar =3D Portal.Portlet.extend ({ =20 init: function (path, name, notifier)=20 { console.info ("Created SearchBar");=20 this.base (path, name, notifier); =09 var AutoCompSelectFnc =3D function(){=20 Portal.$send('AutoCompSelect');=20 }=20 jQuery("#search_term").bind("ncbiautocompleteenter", = AutoCompSelectFnc ).bind("ncbiautocompleteoptionclick", = AutoCompSelectFnc );=20 =0A= }, send: { "Cmd": null, "Term": null, "AutoCompSelect": null },=0A= =09 listen: { // messages=0A= =0A= 'AppendTerm': function(sMessage, oData, sSrc) {=0A= this.ProcessAppendTerm(sMessage, oData, sSrc); },=0A= =0A= // to allow any other portlet to clear term if needed =0A= 'ClearSearchBarTerm': function(sMessage, oData, sSrc) { this.setValue("Term", ''); },=0A= =0A= // request current search bar term to be broadcast =20 'SendSearchBarTerm': function(sMessage, oData, sSrc) { this.send.Term({'term' : this.getValue("Term")}); },=0A= =09 'AutoCompleteControl': function(sMessage, oData, sSrc) { this.ChangeAutoCompleteState(sMessage, oData, sSrc); }, =20 'AutoCompSelect': function(sMessage, oData, sSrc) { this.AutoCompleteOptionSelected(); }, =0A= // Browser events=0A= =0A= "SearchResourceList": function(e, target, name) {=0A= this.ResourceSelected(e, target, name);=0A= },=0A= =0A= "Term": function(e, target, name) { var event =3D e || utils.fixEvent (window.event); if ((event.keyCode || event.which) =3D=3D 13)=20 {=0A= // Emulate Search button click=0A= this.ProcessTermKeyPress(event, e, target, name); } },=0A= =0A= // Cmd is set to Go, so ResultsView of other database can choose = component based=20 // on value of Cmd. The existing search term is also passed down. "Search": function(e, target, name) {=0A= this.ProcessSearchClick (e, target, name); },=0A= =0A= "Preview": function(e, target, name) {=0A= this.ProcessPreviewClick(e, target, name); },=0A= =0A= // On Clear button click, set focus to search box and clear the term "Clear": function (e, target, name) {=0A= this.ProcessClearClick(e, target, name); },=0A= =0A= // On Advanced Search click, append term "Advanced": function (e, target, name) {=0A= this.ProcessAdvancedClick(e, target, name); },=0A= =0A= // On Advanced Search click, append term "LimitsLink": function (e, target, name) { this.ProcessLimitsClick(e, target, name); },=0A= =0A= "CreateRssFeed": function (e, target, name) { this.ProcessCreateRssFeed(e, target, name); }=0A= =0A= }, //end listen=0A= =0A= "ProcessAppendTerm" : function(sMessage, oData, sSrc){=0A= var newTerm =3D this.getValue("Term"); if (newTerm !=3D '' && oData.op !=3D ''){=0A= newTerm =3D '(' + newTerm + ') ' + oData.op + ' ';=0A= }=0A= newTerm +=3D oData.term;=0A= this.setValue("Term", newTerm); =0A= =0A= var oTerm =3D this.getInput("Term"); if (oTerm) { oTerm.focus(); }=0A= },=0A= =0A= "ResourceSelected" : function(e, target, name){=0A= /* if (this.getValue("SearchResourceList") =3D=3D 'customize'){ window.location =3D "/sites/myncbi/searchbar/" + db; }=0A= else=0A= */=0A= =0A= // turn autocomplete off or on if database is changed in selector.=0A= if (this.getValue("Term:suggest") =3D=3D 'true'){ // change to if the current database has a dictionary=20 = this.EnableDisableAutocomplete(target.options[target.selectedIndex].getAt= tribute('resource')); }=0A= =20 },=0A= =0A= "ProcessTermKeyPress" : function(event, e, target, name){=0A= event.returnValue =3D false; if (event.stopPropagation !=3D undefined) event.stopPropagation (); =20 if (event.preventDefault !=3D undefined) event.preventDefault ();=0A= =20 this.ProcessSearchClick (e, target, name);=0A= return false;=0A= },=0A= =0A= "ProcessSearchClick" : function(e, target, name){=0A= var resource =3D this.getValue("SearchResourceList");=0A= var term =3D this.getValue("Term");=0A= var db =3D this.getValue("CurrDb");=0A= =0A= if (resource =3D=3D db){=0A= this.send.Cmd({ 'cmd' : 'Go' }); this.send.Term({ 'term' : this.getValue("Term") });=0A= Portal.requestSubmit(); =0A= } =0A= else {=0A= window.location =3D resource =0A= + (term !=3D '' ? (resource.match(/\?/) ? "&term=3D" : = "?term=3D") + encodeURIComponent(term) : "");=0A= }=0A= },=0A= =0A= "ProcessPreviewClick" : function(e, target, name){ this.send.Cmd({ 'cmd' : 'Preview'=0A= });=0A= this.send.Term({=0A= 'term' : this.getValue("Term")=0A= });=0A= Portal.requestSubmit();=20 },=0A= =0A= "ProcessClearClick" : function(e, target, name){=0A= this.setValue ("Term", ""); var term =3D this.getInput ("Term");=0A= if (term) =0A= term.focus (); =0A= },=0A= =0A= "ProcessAdvancedClick" : function(e, target, name){ window.location =3D target.href; },=0A= =0A= "ProcessLimitsClick" : function(e, target, name){ window.location =3D target.href=0A= + (this.getValue("Term") !=3D '' ? "?term=3D" + = encodeURIComponent(this.getValue("Term")) : "");=0A= },=0A= =0A= "ProcessCreateRssFeed" : function(e, target, name){ // do xml http to create the feed using portal code, then update = the screen with link to feed=0A= var site =3D document.forms[0]['p$st'].value;=0A= var portletPath =3D this.getPortletPath(); =0A= var args =3D { "QueryKey": target.getAttribute('qk'),=0A= "Db": this.getValue("CurrDb"),=0A= "RssFeedName": this.getValue("FeedName"),=0A= "RssFeedLimit": this.getValue("FeedLimit") || = this.getInput("FeedLimit").options[this.getInput("FeedLimit").selectedInd= ex].text,=0A= "HID": target.getAttribute('hid')=0A= };=0A= try{=0A= var resp =3D xmlHttpCall(site, portletPath, "CreateRssFeed", = args, this.receiveRss, {}, this);=0A= }=0A= catch (err){=0A= alert ('Could not create RSS feed.');=0A= } },=0A= =0A= /* this function created to be able to create a hack to overcome = shortcoming in current portal framework=0A= Because of using portlet inheritence, the action defined in the base = portlet cannot be found.=0A= The hack is to allow derived portlets to hard-code the path to = themselves by overriding this function.=0A= This hack can be removed after new implementation of portal is in place = which will view objects as a flat model.=0A= */ =0A= "getPortletPath" : function(){=0A= return this.realname;=0A= },=0A= =0A= receiveRss: function(responseObject, userArgs) {=0A= try{=0A= //Handle timeouts =0A= if(responseObject.status =3D=3D 408){=0A= //display an error indicating a server timeout=0A= alert('RSS feed creation timed out.');=0A= }=0A= =0A= // deserialize the string with the JSON object =0A= var response =3D '(' + responseObject.responseText + ')'; =0A= var JSONobject =3D eval(response);=0A= // display link to feed=0A= document.getElementById('rss_menu').innerHTML =3D = JSONobject.Output;=0A= }=0A= catch(e){=0A= alert('RSS unavailable.');=0A= } }, =20 'ChangeAutoCompleteState': function(sMessage, oData, sSrc){=0A= this.setValue("Term:suggest", 'false'); var site =3D document.forms[0]['p$st'].value; var resp =3D xmlHttpCall(site, this.getPortletPath(), = "AutoCompleteControl", {"ShowAutoComplete": 'false'}, = this.receiveAutoComp, {}, this); }, =20 =20 'receiveAutoComp': function(responseObject, userArgs) { }, =20 'AutoCompleteOptionSelected': function(){=0A= this.ProcessSearchClick (); },=0A= =0A= 'EnableDisableAutocomplete': function(resource){ var site =3D document.forms[0]['p$st'].value; var resp2 =3D xmlHttpCall(site, this.getPortletPath(), = "SetAutoCompleteDictionary", {"Db": resource}, this.receiveDictionary, = {}, this); }, =09 'receiveDictionary': function(responseObject, userArgs){=20 try { // deserialize the string with the JSON object var response =3D '(' + responseObject.responseText + ')'; var JSONobject =3D eval(response); =20 var dict =3D JSONobject.Dictionary || ""; =20 // turn autocomplete off or on if database is changed in = selector. if(dict !=3D ''){ = jQuery("#search_term").ncbiautocomplete("option","isEnabled",true).ncbiau= tocomplete("option","dictionary",dict); } else{ jQuery("#search_term").ncbiautocomplete("turnOff",true); = =20 } } catch (e){ =20 } }=0A= =09 }); function EntrezSearchBarAutoComplCtrl(){ Portal.$send('AutoCompleteControl'); }=0A= Portal.Portlet.Pubmed_SearchBar =3D = Portal.Portlet.Entrez_SearchBar.extend ({=0A= =0A= init: function (path, name, notifier) {=0A= this.base (path, name, notifier);=0A= },=0A= =0A= /* ######### this is a hack. See detailed comment on same function in = base */=0A= "getPortletPath" : function(){=0A= return (this.realname + ".Entrez_SearchBar");=0A= }=0A= });=0A= =0A= =0A= Portal.Portlet.DbConnector =3D Portal.Portlet.extend({ init: function(path, name, notifier) { var oThis =3D this; console.info("Created DbConnector"); this.base(path, name, notifier);=0A= =0A= // reset Db value to original value on page load. Since LastDb is the = same value as Db on page load and LastDb is not changed on=0A= // the client, this value can be used to reset Db. This is a fix for = back button use.=0A= if (this.getValue("Db") !=3D this.getValue("LastDb")){=0A= this.setValue("Db", this.getValue("LastDb"));=0A= } =20 // the SelectedIdList and id count from previous iteration (use a = different attribute from IdsFromResult to prevent back button issues) Portal.Portlet.DbConnector.originalIdList =3D = this.getValue("LastIdsFromResult"); console.info("originalIdList " + = Portal.Portlet.DbConnector.originalIdList); // if there is an IdList from last iteration set the count if (Portal.Portlet.DbConnector.originalIdList !=3D ''){ Portal.Portlet.DbConnector.originalCount =3D = Portal.Portlet.DbConnector.originalIdList.split(/,/).length; } notifier.setListener(this, 'HistoryCmd',=20 function(oListener, custom_data, sMessage, oNotifierObj) { var sbTabCmd =3D $N(oThis.path + '.TabCmd'); sbTabCmd[0].value =3D custom_data.tab; } , null); =20 }, send: { 'SelectedItemCountChanged': null, 'newUidSelectionList': null, 'SavedSelectedItemCount': null,=0A= 'SavedUidList': null }, listen: { =09 //message from Display bar on Presentation change=20 'PresentationChange' : function(sMessage, oData, sSrc){ =09 // set link information only if it exists if (oData.dbfrom){ console.info("Inside PresentationChange in DbConnector: " + = oData.readablename); this.setValue("Db", oData.dbto); this.setValue("LinkSrcDb", oData.dbfrom); this.setValue("LinkName", oData.linkname); this.setValue("LinkReadableName", oData.readablename); } //document.forms[0].submit(); }, =09 // various commands associated with clicking different form control = elements 'Cmd' : function(sMessage, oData, sSrc){ console.info("Inside Cmd in DbConnector: " + oData.cmd); this.setValue("Cmd", oData.cmd); =09 // back button fix, clear TabCmd if (oData.cmd =3D=3D 'Go' || oData.cmd =3D=3D 'PageChanged' || = oData.cmd =3D=3D 'FilterChanged' ||=20 oData.cmd =3D=3D 'DisplayChanged' || oData.cmd =3D=3D 'HistorySearch' = || oData.cmd =3D=3D 'Text' ||=20 oData.cmd =3D=3D 'File' || oData.cmd =3D=3D 'Printer' || oData.cmd = =3D=3D 'Order' ||=20 oData.cmd =3D=3D 'Add to Clipboard' || oData.cmd =3D=3D 'Remove from = Clipboard' ||=20 oData.cmd.toLowerCase().match('details')){ this.setValue("TabCmd", ''); console.info("Inside Cmd in DbConnector, reset TabCmd: " + = this.getValue('TabCmd')); } }, =09 =09 // the term to be shown in the search bar, and used from searching 'Term' : function(sMessage, oData, sSrc){ console.info("Inside Term in DbConnector: " + oData.term); this.setValue("Term", oData.term); }, =09 =09 // to indicate the Command Tab to be in 'TabCmd' : function(sMessage, oData, sSrc){ console.info("Inside TABCMD in DbConnector: " + oData.tab); this.setValue("TabCmd", oData.tab); console.info("DbConnector TabCmd: " + this.getValue("TabCmd")); }, =09 =09 // message sent from SearchBar when db is changed while in a Command = Tab 'DbChanged' : function(sMessage, oData, sSrc){ console.info("Inside DbChanged in DbConnector"); this.setValue("Db", oData.db); }, =09 // Handles item select/deselect events // Argument is { 'id': item-id, 'selected': true or false } 'ItemSelectionChanged' : function(sMessage, oData, oSrc) { var sSelection =3D this.getValue("IdsFromResult"); var bAlreadySelected =3D (new RegExp("\\b" + oData.id + = "\\b").exec(sSelection) !=3D null); var count =3D0; =09 if (oData.selected && !bAlreadySelected) { sSelection +=3D ((sSelection > "") ? "," : "") + oData.id; this.setValue("IdsFromResult", sSelection); if (sSelection.length > 0){ count =3D sSelection.split(',').length; } this.send.SelectedItemCountChanged({'count': count}); this.send.newUidSelectionList({'list': sSelection}); } else if (!oData.selected && bAlreadySelected) { sSelection =3D sSelection.replace(new = RegExp("^"+oData.id+"\\b,?|,?\\b"+oData.id+"\\b"), ''); this.setValue("IdsFromResult", sSelection); console.info("Message ItemSelectionChanged - IdsFromResult after = change: " + this.getValue("IdsFromResult")); if (sSelection.length > 0){ count =3D sSelection.split(',').length; } console.info("Message ItemSelectionChanged - IdsFromResult length: = " + count); =20 this.send.SelectedItemCountChanged({'count': count}); this.send.newUidSelectionList({'list': sSelection}); } }, =09 // FIXME: This is the "old message" that is being phased out. // when result citations are selected, the list of selected ids are = intercepted here, // and notification sent that selected item count has changed. 'newSelection' : function(sMessage, oData, sSrc){ =09 // Check if we already have such IDs in the list var newList =3D new Array(); var haveNow =3D new Array(); if(Portal.Portlet.DbConnector.originalIdList){ haveNow =3D Portal.Portlet.DbConnector.originalIdList.split(','); newList =3D haveNow; } =09 var cameNew =3D new Array(); if (oData.selectionList.length > 0) { cameNew =3D oData.selectionList; } =09 if (cameNew.length > 0) { for(var ind=3D0;ind 0) && (newList[0].length > 0)){ count =3D newList.length; } =09 console.info("id count =3D " + count); this.setValue("IdsFromResult", newList.join(",")); =09 this.send.SelectedItemCountChanged({'count': count}); this.send.newUidSelectionList({'list': newList.join(",")}); }, // empty local idlist when list was being collected for other = purposes. //used by Mesh and Journals (empty UidList should not be distributed, = otherwise Journals breaks)=0A= // now used by all reports for remove from clipboard function. 'ClearIdList' : function(sMessage, oData, sSrc){ this.setValue("IdsFromResult", ''); this.send.SelectedItemCountChanged({'count': '0'}); this.send.newUidSelectionList({'list': ''}); },=20 // back button fix: when search backend click go or hot enter on term = field, //it also sends db. this db should be same as dbconnector's db 'SearchBarSearch' : function(sMessage, oData, sSrc){ if (this.getValue("Db") !=3D oData.db){ this.setValue("Db", oData.db); } }, =09 // back button fix: whrn links is selected from DisplayBar, //ResultsSearchController sends the LastQueryKey from the results on = the page=0A= // (should not be needed by Entrez 3 code) 'LastQueryKey' : function(sMessage, oData, sSrc){ if (this.getInput("LastQueryKey")){ this.setValue("LastQueryKey", oData.qk); } },=0A= =0A= 'QueryKey' : function(sMessage, oData, sSrc){ if (this.getInput("QueryKey")){ this.setValue("QueryKey", oData.qk); } }, =09 =09 //ResultsSearchController asks for the initial item count in case of = send to file=20 'needSavedSelectedItemCount' : function(sMessage, oData, sSrc){ var count =3D 0; if(this.getInput("IdsFromResult")){ if (this.getValue("IdsFromResult").length > 0){ count =3D this.getValue("IdsFromResult").split(',').length; } console.info("sending SavedSelectedItemCount from IdsFromResult: " + = count); } else{ count =3D Portal.Portlet.DbConnector.originalCount; console.info("sending SavedSelectedItemCount from OriginalCount: " + = count); } this.send.SavedSelectedItemCount({'count': count}); },=0A= =09 // Force form submit, optionally passing db, term and cmd parameters 'ForceSubmit': function (sMessage, oData, sSrc) { if (oData.db) this.setValue("Db", oData.db); if (oData.cmd) this.setValue("Cmd", oData.cmd); if (oData.term) this.setValue("Term", oData.term); Portal.requestSubmit (); },=0A= =0A= 'LinkName': function (sMessage, oData, sSrc){=0A= this.setValue("LinkName", oData.linkname);=0A= },=0A= =0A= 'SendSavedUidList': function (sMessage, oData, sSrc){ this.send.SavedUidList({'idlist': = this.getValue("IdsFromResult")}); }=0A= =09 }, //listen=0A= =0A= /* other portlet functions */=0A= =0A= // DisplayBar in new design wants selected item count 'SelectedItemCount': function(){=0A= var count =3D 0; if(this.getInput("IdsFromResult")){=0A= if (this.getValue("IdsFromResult") !=3D ''){=0A= count =3D this.getValue("IdsFromResult").split(',').length;=0A= }=0A= }=0A= else{=0A= count =3D Portal.Portlet.DbConnector.originalCount;=0A= }=0A= return count;=0A= } =09 }, { originalIdList: '', originalCount: 0 });=0A= =0A= function getEntrezSelectedItemCount() { return $PN('DbConnector').SelectedItemCount(); } ------=_NextPart_000_001B_01CB0435.05D27ED0 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.ncbi.nlm.nih.gov/portal/portal3rc.fcgi/rlib/js/InstrumentOmnitureBaseJS/InstrumentNCBIBaseJS/InstrumentPageStarterJS.js if(typeof = ncbi=3D=3D"undefined"){ncbi=3D{};}ncbi.sg=3Dfunction(){};ncbi.sg.getInsta= nce=3Dfunction(){if(!ncbi.sg._instance){ncbi.sg._instance=3Dnew = ncbi.sg();}return = ncbi.sg._instance;};ncbi.sg._instance=3Dnull;ncbi.sg._version=3D'8';ncbi.= sg.timeDelay=3D(Math.random()<.5)?200:400;ncbi.sg.isSafari=3D(navigator&&= navigator.vendor)?(navigator.vendor.indexOf("Apple")!=3D=3D-1):false;ncbi= .sg.appLogIgnore=3D["ncbi_sessionid","ncbi_clickdisabled"];ncbi.sg.protot= ype=3D{init:function(){this.isDebugMode=3D((this.getCookie("debugger").le= ngth>0)&&console&&console.info);this.isProcessRunning=3Dtrue;this._setUpO= mnValues();this._setUpPathParts();this._setUpCustomProps();this.send("ini= t");},_vals:{},_cachedVals:{},_hasInitRun:false,_pathParts:{"part1":"","p= art2":"","part3":"","part4":""},_setUpOmnValues:function(){var = mTags=3Ddocument.getElementsByTagName("meta");for(var = i=3D0;i100&&this.ignoreLengthRestrictions.indexOf(mName)=3D=3D= =3D-1){mContent=3DmContent.substr(0,100);}this._cachedVals[mName]=3D{sPro= p:mName,value:mContent};},removeAllEntries:function(){this._cachedVals=3D= {};for(var p in = this._pathParts){this._pathParts[p]=3D"";}},_setUpCustomProps:function(){= var a=3Dthis._pathParts.part1;var = b=3D(this._pathParts.part2.length>0)?":"+this._pathParts.part2:"";var = c=3D(this._pathParts.part3.length>0)?":"+this._pathParts.part3:"";var = d=3D(this._pathParts.part4.length>0)?":"+this._pathParts.part4:"";var = custData=3D{"pagename":a+b+c,"server":window.location.hostname,"sitesect2= ":a+b,"subsect3":a+b+c,"subsect4":a+b+c+d,"heir1":(a+b+c+d).replace(/:/g,= "|")};for(var prop in = custData){this.addEntry(prop,custData[prop]);}this._sessionIdCheck();this= ._staticPageCheck();this._reloadCheck();this._prevHitCheck();this._config= Check();},_staticPageCheck:function(){if(!(this._cachedVals["ncbi_app"]&&= this._cachedVals["ncbi_app"].value.length>0)){this.addEntry("ncbi_app","s= tatic");}if(!(this._cachedVals["ncbi_pdid"]&&this._cachedVals["ncbi_pdid"= ].value.length>0)){var = title=3D(document.title||"unknown").replace(/\s+/g,"");this.addEntry("ncb= i_pdid",title);}},_sessionIdCheck:function(){if(!(this._cachedVals["ncbi_= sessionid"]&&this._cachedVals["ncbi_sessionid"].value.length>0)){var = sessID=3D"";if(sessID.length=3D=3D=3D0){var = webEnv=3Dthis.getCookie("WebCubbyUser")||this.getCookie("WebEnv");if(webE= nv.length>0){webEnv=3Dunescape(webEnv).split("@");if(webEnv.length>1){ses= sID=3DwebEnv[webEnv.length-1];}}}if(sessID.length=3D=3D=3D0){sessID=3D"NO= SESSIONID";}this.addEntry("ncbi_sessionid",sessID);}},_reloadCheck:functi= on(){var rlCount=3Dthis.getCookie("ncbi_reload");var = rlReport=3D"null";if(rlCount.length>0){rlCount=3DparseInt(rlCount,10)+1;r= lReport=3D(rlCount>1)?"true":"false";this.setCookie("ncbi_reload",rlCount= );}this.addEntry("ncbi_reload",rlReport);},_configCheck:function(){var = bWidth=3Dwindow.innerWidth!=3D=3Dnull?window.innerWidth:document.document= Element&&document.documentElement.clientWidth?document.documentElement.cl= ientWidth:document.body!=3D=3Dnull?document.body.clientWidth:"NA";var = bHeight=3Dwindow.innerHeight!=3D=3Dnull?window.innerHeight:document.docum= entElement&&document.documentElement.clientHeight?document.documentElemen= t.clientHeight:document.body!=3D=3Dnull?document.body.clientHeight:"NA";t= his.addEntry("browserwidth",bWidth);this.addEntry("browserheight",bHeight= );this.addEntry("screenwidth",screen.width);this.addEntry("screenheight",= screen.height);this.addEntry("screenavailwidth",screen.availWidth);this.a= ddEntry("screenavailheight",screen.availHeight);if(screen.colorDepth){thi= s.addEntry("colorDepth",screen.colorDepth);}else = if(screen.pixelDepth){this.addEntry("colorDepth",screen.pixelDepth);}},_c= reatePHID:function(){var sess=3Dthis._cachedVals["ncbi_sessionid"];var = sessVal=3Dsess.value;var calcPHID=3DsessVal.substr(0,15)+"9"+new = Date().getTime().toString();var left=3D32-calcPHID.length;var = sessLen=3DsessVal.length;calcPHID+=3DsessVal.substr(sessLen-left,sessLen)= ;var = currPHID=3D{value:calcPHID};this.addEntry("ncbi_phid",calcPHID);return = currPHID;},currentPageHitId:null,_prevHitCheck:function(){var = prevPHID=3Dthis.getCookie("ncbi_prevPHID");var = currPHID=3Dthis._cachedVals["ncbi_phid"];if(prevPHID.length>0){this.addEn= try("prev_phid",prevPHID);}if(!currPHID||!currPHID.value||currPHID.value.= length=3D=3D=3D0){currPHID=3Dthis._createPHID();}this.currentPageHitId=3D= currPHID.value;var = that=3Dthis;if(ncbi.sg._hasFocus){that.setCookie("ncbi_prevPHID",currPHID= .value);}var = oFoc=3Dwindow.onfocus;window.onfocus=3Dfunction(e){if(that.getCookie("ncb= i_prevPHID")!=3D=3DcurrPHID.value){that.setCookie("ncbi_prevPHID",currPHI= D.value);}if(typeof = oFoc=3D=3D=3D"function"){oFoc(e);}};},_setUpPathParts:function(){var = ncbi_app=3Dthis._cachedVals["ncbi_app"];var = ncbi_db=3Dthis._cachedVals["ncbi_db"];var = ncbi_pdid=3Dthis._cachedVals["ncbi_pdid"];var = ncbi_pcid=3Dthis._cachedVals["ncbi_pcid"];this._pathParts.part1=3D(ncbi_a= pp!=3D=3Dundefined)?ncbi_app.value:"";this._pathParts.part2=3D(ncbi_db!=3D= =3Dundefined)?ncbi_db.value:"";this._pathParts.part3=3D(ncbi_pdid!=3D=3Du= ndefined)?ncbi_pdid.value:"";this._pathParts.part4=3D(ncbi_pcid!=3D=3Dund= efined)?ncbi_pcid.value:"";},send:function(method,callbackFnc){var = al=3D[];if(method=3D=3D=3D"init"){al.push("jsevent=3Drender");ncbi.sg.ren= derTime=3Dnew Date();if(typeof ncbi_startTime!=3D=3D"undefined"){var = dtRenderTime=3Dncbi.sg.renderTime-ncbi_startTime;al.push("jsrendertime=3D= "+dtRenderTime);if(ncbi.sg.loadTime){var = dtLoadTime=3Dncbi.sg.loadTime-ncbi_startTime;al.push("jsloadtime=3D"+dtLo= adTime);}}if(!ncbi.sg.isSafari){al.push("timeDelay=3D"+ncbi.sg.timeDelay)= ;}}for(var prop in = this._cachedVals){if(ncbi.sg.appLogIgnore.indexOf(prop)!=3D=3D-1){continu= e;}var = val=3Dthis._cachedVals[prop].value;al.push(prop+"=3D"+encodeURIComponent(= val));}al.push("wasOmnPinged=3D"+false);var = appStr=3Dal.join("&");if(this.isDebugMode){console.info("sg = Data:\n\n"+al.join("\n"));}this.sendAl(appStr,callbackFnc,true);this._has= InitRun=3Dtrue;var = ref=3Dthis;setTimeout(function(){ref.isProcessRunning=3Dfalse;ref.runSGPr= ocess();},300);},sendAl:function(data,callbackFnc,isAsync){data+=3D"&sgVe= rsion=3D"+ncbi.sg._version;if(this.isDebugMode){console.info("al Sent: = \n"+data);}var ref=3Dthis;var = port=3D(window.location.port.length>0)?":"+window.location.port:"";var = reqURL=3Dwindow.location.protocol+"//"+window.location.hostname+port+"/st= at?"+data;this.makeAjaxCall(reqURL,function(){if(ref.isDebugMode){console= .info("al: done");}if(typeof = callbackFnc=3D=3D=3D"function"){callbackFnc();}},isAsync);},_processingQu= eue:[],isProcessRunning:false,addSGProcess:function(data){this._processin= gQueue.push(data);},getSGProcess:function(data){return = this._processingQueue.shift(data);},runSGProcess:function(){if(this.isPro= cessRunning||this._processingQueue.length=3D=3D=3D0||!this._hasInitRun){r= eturn false;}this.isProcessRunning=3Dtrue;this.removeAllEntries();var = nextSet=3Dthis.getSGProcess();this._setUpSubsetOmnValues(nextSet.metadata= );if(this.isDebugMode){console.info("Now sg "+nextSet.eventName+" to the = server");}this.addEntry("jsevent",nextSet.eventName);for(var entry in = nextSet.props){this.addEntry(entry,nextSet.props[entry]);}this.send(nextS= et.eventName,nextSet.callbackFnc);var = ref=3Dthis;setTimeout(function(){ref.isProcessRunning=3Dfalse;ref.runSGPr= ocess();},300);},noteEventData:function(jsEventName,custprops,metaData,ca= llbackFnc){if(this.isDebugMode){console.info("Adding "+jsEventName+" to = the = queue");}this.addSGProcess({"eventName":jsEventName,"props":custprops,"me= tadata":metaData,"callback":callbackFnc});this.runSGProcess();},setCookie= :function(c_name,value,expiredays){var exdate=3Dnew = Date();if(expiredays!=3D=3Dnull){exdate.setDate(exdate.getDate()+expireda= ys);}document.cookie=3Dc_name+"=3D"+escape(value)+((expiredays=3D=3D=3Dnu= ll)?"":"; expires=3D"+exdate.toGMTString())+"; = domain=3D"+escape(".nih.gov")+"; = path=3D/";},getCookie:function(c_name){if(document.cookie.length>0){var = c_start=3Ddocument.cookie.indexOf(c_name+"=3D");if(c_start!=3D-1){c_start= =3Dc_start+c_name.length+1;var = c_end=3Ddocument.cookie.indexOf(";",c_start);if(c_end=3D=3D-1){c_end=3Ddo= cument.cookie.length;}return = unescape(document.cookie.substring(c_start,c_end));}}return"";},getTransp= ort:function(){var req=3Dnull;if(window.XMLHttpRequest){try{req=3Dnew = XMLHttpRequest();this.getTransport=3Dfunction(){return new = XMLHttpRequest();};}catch(e0){req=3Dnull;}}if(window.ActiveXObject&&req=3D= =3D=3Dnull){try{req=3Dnew = ActiveXObject("Msxml2.XMLHTTP");this.getTransport=3Dfunction(){return = new ActiveXObject("Msxml2.XMLHTTP");};}catch(e1){try{req=3Dnew = ActiveXObject("Microsoft.XMLHTTP");this.getTransport=3Dfunction(){return = new = ActiveXObject("Microsoft.XMLHTTP");};}catch(e2){req=3Dfalse;}}}if(req=3D=3D= =3Dnull){this.getTransport=3Dfunction(){return null;};}return = this.getTransport();},makeAjaxCall:function(url,callback,isAsync){var = xhr=3Dthis.getTransport();xhr.open("GET",url,isAsync);if(isAsync){xhr.onr= eadystatechange=3Dfunction(){if(xhr.readyState=3D=3D=3D4){callback(xhr);}= };}ncbi.sg.lastPing=3Dxhr;xhr.send(null);}};ncbi.sg.lastPing=3Dnull;ncbi.= sg.hasNotedErrorEvent=3Dfalse;(function(){var = oe=3Dwindow.onerror;window.onerror=3Dfunction(a,b,c){if(this.isDebugMode&= &console.warn){console.warn("sg error to server to be investigated: = \n"+a+"\n"+b+"\n"+c);}if(ncbi.sg.hasNotedErrorEvent){if(this.isDebugMode)= {console.info("Already found one error for this page, not sending = another error = report");}return;}ncbi.sg.getInstance().noteEventData("jserror",{"jserror= ":c+": = "+a,"jserrortype":b},["ncbi_sessionid","ncbi_phid"]);ncbi.sg.hasNotedErro= rEvent=3Dtrue;if(typeof oe=3D=3D=3D"function"){return oe(a,b,c);}};var = obul=3Dwindow.onbeforeunload;window.onbeforeunload=3Dfunction(e){pingHit(= );var ts=3Dnew Date().getTime()+ncbi.sg.timeDelay;var endTime=3Dnew = Date(ts);if(ncbi.sg.lastPing&&ncbi.sg.lastPing.readyState<4){while(new = Date()0?hits[queLen-1]:histLen>0?processedHits[histLen-1]:null= ;if(lastHit!=3D=3Dnull){if(hitObj.elem=3D=3DlastHit.elem){if((lastHit.flo= odTstamp&&hitObj.floodTstamp-lastHit.tstamp<=3D400)||(hitObj.tstamp-lastH= it.tstamp<=3D400)){lastHit.floodTstamp=3Dnew Date().getTime();return = false;}}lastHit.floodTstamp=3Dnew = Date().getTime();}hits.push(hitObj);return true;}var = hasUnloadHappened=3Dfalse;function = pingHit(){ncbi.sg.getInstance().setCookie("ncbi_prevPHID",ncbi.sg.getInst= ance().currentPageHitId);if(hits.length>0){while(hits.length>0){sendClick= (hits.pop());}}if(!hasUnloadHappened){ncbi.sg.ping({"jsevent":"unload","n= cbi_pingaction":"unload"});}hasUnloadHappened=3Dtrue;}function = reassignOnclick(elem){if(!elem){return;}if(elem.onclick){elem.onclick_=3D= elem.onclick;}if(elem.oncontextmenu){elem.oncontextmenu_=3Delem.oncontext= menu;}}function noteClick(detail){for(var = i=3Dhits.length-1;i>=3D-1;i--){if(hits[i]=3D=3Ddetail){hits.slice(i,1);br= eak;}}sendClick(detail);}function = sendClick(detail,additionalData){if(loggedHits.indexOf(detail.tstamp)!=3D= =3D-1){return;}loggedHits.push(detail.tstamp);processedHits.push(detail);= var linkObj=3Ddetail.link;var evt=3Ddetail.evt;var = link_id=3DlinkObj.id||"";var link_name=3DlinkObj.name||"";var = link_sid=3DlinkObj.sid||"";var link_href=3DlinkObj.href||"";var = link_text=3DlinkObj.innerText||linkObj.textContent||"";if(link_text.lengt= h>50){link_text=3Dlink_text.substr(0,50);}var = link_ref=3DlinkObj.getAttribute("ref")||linkObj.ref||"";var = link_class=3DlinkObj.className.split(/\s/g).join(",")||"";var = ancestorId=3D[];var ancestorClassName=3D[];var = parObj=3DlinkObj.parentNode;if(parObj){for(var = i=3D0;i<6&&parObj!=3D=3Dnull;i++){parId=3DparObj.id;if(parId){ancestorId.= push(parId);}parClassName=3DparObj.className;if(parClassName){ancestorCla= ssName=3DancestorClassName.concat(parClassName.split(/\s/));}parObj=3Dpar= Obj.parentNode;}}var = phid=3Dncbi.sg.getInstance().currentPageHitId||"";var = data=3D[];if(link_id.length>0){data.push("link_id=3D"+encodeURIComponent(= link_id));}if(link_name.length>0){data.push("link_name=3D"+encodeURICompo= nent(link_name));}if(link_sid.length>0){data.push("link_sid=3D"+encodeURI= Component(link_sid));}if(link_href.length>0){data.push("link_href=3D"+enc= odeURIComponent(link_href));}if(link_text.length>0){data.push("link_text=3D= "+encodeURIComponent(link_text));}if(link_class.length>0){data.push("link= _class=3D"+encodeURIComponent(link_class));}if(evt.link_coor_x.toString()= .length>0){data.push("link_coor_x=3D"+evt.link_coor_x.toString());}if(evt= .link_coor_y.toString().length>0){data.push("link_coor_y=3D"+evt.link_coo= r_y.toString());}if(evt.link_scroll_x.toString().length>0){data.push("lin= k_scroll_x=3D"+evt.link_scroll_x.toString());}if(evt.link_scroll_y.toStri= ng().length>0){data.push("link_scroll_y=3D"+evt.link_scroll_y.toString())= ;}if(evt.iscontextmenu.length>0){data.push("iscontextmenu=3D"+evt.isconte= xtmenu);}data.push("jsevent=3Dclick");if(link_ref.length>0){data.push(lin= k_ref);}if(typeof jQuery!=3D=3D"undefined"){var = linkSG=3DjQuery(linkObj).attr("sg");if(linkSG){var = sgData=3DlinkSG.split(/\}\s*,\s*\{/);for(var = i=3D0;i0){while(= additionalData.length>0){data.push(additionalData.shift());}}if(ancestorI= d.length>0){data.push("ancestorId=3D"+ancestorId.join(","));}if(ancestorC= lassName.length>0){data.push("ancestorClassName=3D"+ancestorClassName.joi= n(","));}var = isAsynchronous=3D!ncbi.sg.isSafari;ncbi.sg.ping(data,isAsynchronous);}ncb= i.sg.clickTimers=3D[];function linkLoop(links,linkCurr,linkLen){function = _clicky(evt,elem,args,method){ncbi.sg.getInstance().setCookie("ncbi_prevP= HID",ncbi.sg.getInstance().currentPageHitId);var = eventDetails=3D{};if(evt.clientX||evt.clientY){eventDetails.link_coor_x=3D= evt.clientX+document.body.scrollLeft;eventDetails.link_coor_y=3Devt.clien= tY+document.body.scrollTop;}else{eventDetails.link_coor_x=3Devt.pageX;eve= ntDetails.link_coor_y=3Devt.pageY;}eventDetails.link_scroll_x=3Ddocument.= body.scrollLeft||0;eventDetails.link_scroll_y=3Ddocument.body.scrollTop||= 0;if(eventDetails.link_scroll_x=3D=3D=3D0&&eventDetails.link_scroll_y=3D=3D= =3D0){if(window.pageXOffset||window.pageYOffset){eventDetails.link_scroll= _x=3Dwindow.pageXOffset;eventDetails.link_scroll_y=3Dwindow.pageYOffset;}= else = if(document.body.parentElement){eventDetails.link_scroll_x=3Ddocument.bod= y.parentElement.scrollLeft||0;eventDetails.link_scroll_y=3Ddocument.body.= parentElement.scrollTop||0;}}eventDetails.iscontextmenu=3D(method=3D=3D=3D= "contextmenu")?"true":"false";var = clickDetails=3D{"evt":eventDetails,"link":elem,tstamp:new = Date().getTime(),floodTstamp:new = Date().getTime()};noteClick(clickDetails);if(ncbi.sg.clickTimers){window.= clearTimeout(ncbi.sg.clickTimers);}ncbi.sg.clickTimers=3Dwindow.setTimeou= t(function(){ncbi.sg.clickTimers=3Dnull;},300);var = returnData=3Dnull;function runDefault(meth){var = fixEvent=3Dfunction(e){if(typeof = e.preventDefault=3D=3D=3D"undefined")e.preventDefault=3Dfunction(){this.r= eturnValue=3Dfalse;};if(typeof = e.stopPropagation=3D=3D=3D"undefined")e.stopPropagation=3Dfunction(){this= .cancelBubble=3Dtrue;};return e;};var fixedEvt=3DfixEvent(evt);var = argsAdj=3D[fixedEvt];for(var = i=3D0;i=3D0){if(metas[i].name.toLowerCase()=3D=3D=3D= "ncbi_clickdisabled"){isClickEnabled=3Dmetas[i].content.toLowerCase()=3D=3D= =3D"false";break;}i--;}ncbi.sg.isClickEnabled=3DisClickEnabled;}function = scanLinks(){if(ncbi.sg.isClickEnabled){var = lnks=3Ddocument.links;linkLoop(lnks,0,lnks.length);var = btns=3Ddocument.getElementsByTagName("button");linkLoop(btns,0,btns.lengt= h);var btns2=3D[];if(typeof = jQuery!=3D=3D"undefined"){btns2=3DjQuery("input[type=3Dbutton], = input[type=3Dsubmit], input[type=3Dreset]").get();}else{var = fInputs=3Ddocument.getElementsByTagName("input");btns2=3D[];var = i=3DfInputs.length-1;while(i>=3D0){var inp=3DfInputs[i];var = typ=3Dinp.type;if(typ=3D=3D=3D"button"||typ=3D=3D=3D"submit"||typ=3D=3D=3D= "reset"){btns2.push(inp);}i--;}}if(btns2.length>0){linkLoop(btns2,0,btns2= .length);}}}scanLinks();ncbi.sg.scanLinks=3Dfunction(linkObjs){if(linkObj= s){if(typeof linkObjs=3D=3D=3D"object"&&!(linkObjs instanceof = Array)){linkObjs=3D[linkObjs];}linkLoop(linkObjs,0,linkObjs.length);}else= {scanLinks();}};ncbi.sg.ping=3Dfunction(obj,isAsync){if(typeof = obj=3D=3D=3D"undefined"||obj=3D=3D=3Dnull){return;}if(typeof = isAsync=3D=3D=3D"undefined"){isAsync=3Dtrue;}var data=3D[];if(typeof = obj=3D=3D=3D"object"&&!(obj instanceof Array)){for(var prop in = obj){data.push(prop+"=3D"+encodeURIComponent(obj[prop]));}}else = if(typeof obj=3D=3D=3D"string"){data.push(obj);}else{data=3Dobj;}var = phid=3Dncbi.sg.getInstance().currentPageHitId||"";if(phid.length>0){data.= push("ncbi_phid=3D"+encodeURIComponent(phid));}if(typeof = ncbi.sg.loadTime!=3D=3D"undefined"){data.push("ncbi_timesinceload=3D"+(ne= w = Date()-ncbi.sg.loadTime));}ncbi.sg.getInstance().sendAl(data.join("&"),nu= ll,isAsync);};ncbi.sg.loadTime=3Dnew = Date();})();if(!Array.prototype.indexOf){Array.prototype.indexOf=3Dfuncti= on(elt){var len=3Dthis.length>>>0;var = from=3DNumber(arguments[1])||0;from=3D(from<0)?Math.ceil(from):Math.floor= (from);if(from<0){from+=3Dlen;}for(;from